Extracting Window Styles

This is probably a newbie question.

Given the output of window.GetWindowStyleFlag(), 2621440 for
example, how do I get a list of which style(s) this represents?

Failing that, how would I iterate through a list of *all* window
styles, to determine if this window has the given style?

And finally, say I wanted to add a style to the window. Would I
just bitwise-or that, such as:

window.SetWindowStyleFlag(window.GetWindowStyleFlag |
wx.STYLE_TO_ADD)

Thanks!

···

--
Paul

Paul McNett writes:

This is probably a newbie question.

Apparently it was. I just reviewed the following tutorial on
bitwise operations for implementing flags:

http://www.divnull.com/lward/personal/writing/bitwise.html

and that answered most of my questions. However, I'd still like
to know the answer to:

···

Given the output of window.GetWindowStyleFlag(), 2621440 for
example, how do I get a list of which style(s) this
represents?

--
Paul

Paul McNett wrote:

Paul McNett writes:

This is probably a newbie question.

Apparently it was. I just reviewed the following tutorial on bitwise operations for implementing flags:

http://www.divnull.com/lward/personal/writing/bitwise.html

and that answered most of my questions. However, I'd still like to know the answer to:

Given the output of window.GetWindowStyleFlag(), 2621440 for
example, how do I get a list of which style(s) this
represents?

The answer is given in "Check a flag"
You will manually need to check for every flag using:
bSomeFlag = (WindowStyle & SOMEFLAG) == SOMEFLAG

···

--
Regards,
Matthijs de Smedt
mat88@xs4all.nl

Matthijs de Smedt writes:

>>Given the output of window.GetWindowStyleFlag(), 2621440
>> for example, how do I get a list of which style(s) this
>> represents?

The answer is given in "Check a flag"
You will manually need to check for every flag using:
bSomeFlag = (WindowStyle & SOMEFLAG) == SOMEFLAG

Thanks, I thought so. So now, is there a generic way to get a
list of all possible flags? I could be a generic Window, a
ComboBox, a Frame, etc. etc.

···

--
Paul