Color selection
-
I am trying to initialize a "brush" in visual C++ and then call it back and changing the colors of RGB. My statments for initialization are: CFrame::CFrame() { ... ... ... colorbar.CreateSolidBrush(RGB(a,b,c)); ... ... } void CFrame::OnPaint() { CPaintDC dc(this); dc.TextOut (5,40,"Red Color Is:"); //Output color frame COLORREF(RGB(a,b,c)); a = x; CRect rc(100,150,150,200); dc.FillSolidRect(&rc,RGB(a,250,250)); } No matter what I try, the colors only get defined at initialize time and never change. Are there functions in MFC that allow one to change the colors after initialization and what are they? Please let me know at sid_kraft@msn.com. Thanks in advance, Sid Kraft Sid
-
I am trying to initialize a "brush" in visual C++ and then call it back and changing the colors of RGB. My statments for initialization are: CFrame::CFrame() { ... ... ... colorbar.CreateSolidBrush(RGB(a,b,c)); ... ... } void CFrame::OnPaint() { CPaintDC dc(this); dc.TextOut (5,40,"Red Color Is:"); //Output color frame COLORREF(RGB(a,b,c)); a = x; CRect rc(100,150,150,200); dc.FillSolidRect(&rc,RGB(a,250,250)); } No matter what I try, the colors only get defined at initialize time and never change. Are there functions in MFC that allow one to change the colors after initialization and what are they? Please let me know at sid_kraft@msn.com. Thanks in advance, Sid Kraft Sid