Home > Software engineering >  Color gradient of triangle with MFC
Color gradient of triangle with MFC

Time:09-17

Computer graphics MFC after drawing a triangle, for all of color change, allowed in a different color to fill in, and fill color is gradual change, (generally not smart, to specify a color, after how to draw the triangle, you can choose color filling)

CodePudding user response:

Search the GDI + gradient brush

CodePudding user response:

reference 1st floor zgl7903 response:
search GDI + gradient brush
that how after finished drawing, oneself change color in the panel, use color dialog when it cannot be displayed in the window

CodePudding user response:

reference weixin_45170121 reply: 3/f
Quote: refer to 1st floor zgl7903 response:
search GDI + gradient brush
that how after finished drawing, oneself change color in the panel, use color dialog when it cannot be displayed in the window

Don't understand what you say, is refers to the color dialog, select after don't mean to refresh?

CodePudding user response:

reference 4 floor zgl7903 response:
Quote: reference weixin_45170121 reply: 3/f

Quote: refer to 1st floor zgl7903 response:
search GDI + gradient brush
that how after finished drawing, oneself change color in the panel, use color dialog when it cannot be displayed in the window

Don't understand what you say, is refers to the color dialog, select after don't mean to refresh?
is wrote about color dialog code, but at run time, the color dialog cannot be displayed? I don't know why

CodePudding user response:

 
Void CDlg3Dlg: : OnButton1 ()
{
CColorDialog DLG (RGB (0, 255), CC_RGBINIT, this);
If (DLG) DoModal ()==IDOK)
{
COLORREF crColor=DLG. GetColor ();
TRACE (_T (" Select color RGB (% d, % d, % d) \ n "),
GetRValue (crColor),
GetGValue (crColor),
GetBValue (crColor));
}
}


  • Related