srvet_claudio wrote:PD: A suggestion: should be used to draw the button the api functions that draw with the style of Windows active theme, otherwise the button is flat and the other controls are drawn by superimposing layers of images that recreate the active theme. This is the way that Windows draws controls with active theme.
Oh yes, I could use the functions:
OpenThemeData()
DrawThemeBackground()
DrawThemeText()
CloseThemeData()
But in this way I can not draw rounded/circular buttons.
It seems to me that the simplest solution of the colored buttons will be adding in HMG two properties for standard buttons:
TEXTCOLOR
BACKCOLOR
and processing WM_NOTIFY/NM_CUSTOMDRAW message.
srvet_claudio wrote:PD: A suggestion: should be used to draw the button the api functions that draw with the style of Windows active theme, otherwise the button is flat and the other controls are drawn by superimposing layers of images that recreate the active theme. This is the way that Windows draws controls with active theme.
Oh yes, I could use the functions:
OpenThemeData()
DrawThemeBackground()
DrawThemeText()
CloseThemeData()
But in this way I can not draw rounded/circular buttons.
It seems to me that the simplest solution of the colored buttons will be adding in HMG two properties for standard buttons:
TEXTCOLOR
BACKCOLOR
and processing WM_NOTIFY/NM_CUSTOMDRAW message.
The problem of this type of solution is that departs from the normal behavior of Windows with active theme.
Below is the new version of owner draw buttons.
Added: gradiend for backgroud color.
Warning: changed aColor structure. I'm sorry for the inconvenience.
There's only one thing I'd like you to change: Is it possible to transform RGB color into HexaDecimals ? (Because we are accustomed RGB in array with the three elements). As for aesthetics, IMHO You do not have to change anything !
I liked it a lot and I would definitely use it in my applications when you need differentiated buttons.
Thank you very much, Mr. Krzysztof, great work !
HMGing a better world "Matter tells space how to curve, space tells matter how to move." Albert Einstein
Pablo César wrote:There's only one thing I'd like you to change: Is it possible to transform RGB color into HexaDecimals ? (Because we are accustomed RGB in array with the three elements).
You can use RGB macro and GetRed, GetGreen, GetBlue functions: