flat assembler
Message board for the users of flat assembler.

Index > Windows > hbrbackground

Author
Thread Post new topic Reply to topic
dv4-fa



Joined: 08 Feb 2013
Posts: 14
dv4-fa 12 Mar 2013, 10:42
How can i use the hbrbackground member of wndclassex to change for example the color of the border? I tried mov dword [wndclassex.hbrbackground], COLOR_ACTIVEBORDER+1 but then the background changes and not the border.
Post 12 Mar 2013, 10:42
View user's profile Send private message Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr 12 Mar 2013, 11:55
dv4-fa,

Border is a non-client area of a window. Hence, WM_NCPAINT is the way to go.
Post 12 Mar 2013, 11:55
View user's profile Send private message Reply with quote
dv4-fa



Joined: 08 Feb 2013
Posts: 14
dv4-fa 12 Mar 2013, 12:52
Thanks, but i already know about wm_ncpaint.

Wndclassex: http://msdn.microsoft.com/en-us/library/windows/desktop/ms633577(v=vs.85).aspx.

looking at this msdn page at the hbrbackground member info it says something about color_background btnface highlight etc (convert to hbrush??? How???).. What i wanna do is use wndclassex to initialize the dialog with set colorscheme for border, highlight on button etc. For that specific window. because setsystemcolors never works for me.
Post 12 Mar 2013, 12:52
View user's profile Send private message Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1694
Location: Toronto, Canada
AsmGuru62 12 Mar 2013, 17:01
To completely override the dialog colors most likely you need to draw in response to WM_NCPAINT.
WNDCLASSEX will not help here.
Post 12 Mar 2013, 17:01
View user's profile Send private message Send e-mail Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr 12 Mar 2013, 17:11
dv4-fa,

Those constants are just references into system-wide colors' scheme (pseudo-brushes' handles actually). You may use SetSysColors() if you're brave enough. Wink
Post 12 Mar 2013, 17:11
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.