How do i do to mask windows styles, i mean suppose that we have:

WS_CHILD or WS_VISIBLE or WS_CAPTION

and i want to know if WS_CAPTION is on?
Posted on 2004-03-22 08:40:02 by Ateneo
Let say the style is in eax,



test eax, WS_CAPTION
jz nowscaption
;jnz wscaption


To mask certain window style xor -1 with the style to create the mask and with and with the mask
Posted on 2004-03-22 09:16:54 by roticv
Hi,

Roticv's example wiil work for most window styles. But there are some older controls where combined bits indicate a different style. For example the BS_xxx styles in a button up to 0Fh. The simple test method will fail to properly indicate the right style, for example a BS_GROUPBOX would also indicate a BS_CHECKBOX, BS_DEFPUSHBUTTON and BS_RADIOBUTTON. The most reliable way to check for a style is unfortunately a little longer and modifies eax :

mov eax,[Style]

and eax,BS_GROUPBOX
cmp eax,BS_GROUPBOX
jne >.NOTAGROUPBOX
Posted on 2004-03-22 13:41:12 by donkey
Thanks...
Posted on 2004-03-22 14:08:14 by Ateneo