Owner Drawn Button
-
I would like to paint a focus rect around the inside of my buttons, I can not figure out how to make a brush that is the text color every other pixel (like the standard windows buttons focus rect) wWw.KruncherInc.cOm
-
I would like to paint a focus rect around the inside of my buttons, I can not figure out how to make a brush that is the text color every other pixel (like the standard windows buttons focus rect) wWw.KruncherInc.cOm
Take a look at
CPen
you can set its style toPS_DOT
Ant. I'm hard, yet soft.
I'm coloured, yet clear.
I'm fruity and sweet.
I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain) -
Take a look at
CPen
you can set its style toPS_DOT
Ant. I'm hard, yet soft.
I'm coloured, yet clear.
I'm fruity and sweet.
I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)Oh, I'm sorry, I forgot to mention that this program is all WIN32 not MFC. wWw.KruncherInc.cOm
-
I would like to paint a focus rect around the inside of my buttons, I can not figure out how to make a brush that is the text color every other pixel (like the standard windows buttons focus rect) wWw.KruncherInc.cOm
You'll need to call SetROP2() with the appropriate draw mode type then select a null brush into the DC so that Rectangle() will only draw the border of the rectangle without filling it. You could take a look at one of the custom button drawing articles to see how it is done. Yes I know they are using MFC, but the steps are exactly the same. Since MFC DC class is just a wrapper around the Win32 function calls with some additional functionality to help avoid a few steps, you should have no problem understanding what they are doing. Good Luck! INTP