If I wanted to know the styles applied to a window I can use:
dwStyle=_GetWindowLong(w1.hwnd,GWL_STYLE)
but dwStyle would be in the way:
dwStyle = style1 | style2 | style3 ...
Is there some way to find these values individually?
Ty.
Just use a bitwise AND.
if dwstyle & WS_BORDER
'border is part of the styles.
endif
Because Microsoft does some slight of hand with style bits, I usually do an & with a compare:
if (dwstyle & WS_BORDER) = WS_BORDER
'border is part of the styles.
endif
Which is especially important with button control styles. Button control styles reuse style bits and are not powers of 2 like most other window styles.
Paul.
Thank you!