In a Window Class, you can specify a backgrond color like "COLOR_WINDOW", how do I get the COLLOREF of these colors? (There MUST be a function!)
SPH
In a Window Class, you can specify a backgrond color like "COLOR_WINDOW", how do I get the COLLOREF of these colors? (There MUST be a function!)
SPH
Try,
COLORREF GetBkColor(HDC)
or one of its related group.
doesnt return the background color of the window... just the text background (its prupose).
SPH
If you are creating a window class
try setting the bkgn with
WndClass.hbrBackground =GetStockObject(GREY_BRUSH);
or
COLORREF=GetPixel(HDC,x,y);
or even
GetSysColor()
Last edited by novacain; 09-04-2001 at 02:01 AM.
Please... read the q . I am trying to retrive a window class, and trying to get the COLOREF of the background...
SPH
OK.
If you registered the class use,
GetClassInfoEx()
and look at the background member. This is a brush not a COLOURREF. But by using the previous functions you should be able to draw with the brush and pull out the color.