Page 1 of 1

Setting Gadget Flags

Posted: Mon Jul 28, 2003 5:50 am
by Inner
How do you set gadget flags after they've been created.

I need to set listicongadget() to set #LVS_AUTOARRANGE in one mode and not in the other.

Posted: Mon Jul 28, 2003 11:43 am
by freak

Code: Select all

Styles.l = GetWindowLong_( GadgetID(#Gadget), #GWL_STYLE)
Styles = Styles | #LVS_AUTOARRANGE 
SetWindowLong_( GadgetID(#Gadget), #GWL_STYLE, Styles)
If you want to remove a Flag, instead of adding it, you can use
Styles = Styles &~ #LVS_AUTOARRANGE

Timo

Posted: Mon Jul 28, 2003 12:09 pm
by Inner
Thanks, I knew it was something like that, mental block :) thanks alot.