![]() |
GetWindowInfo -
Sup guys,
When you do retrieve a window's information using GetWindowInfo, how do you check to see if a window has the style WS_OVERLAPPED? Thanks. |
Re: GetWindowInfo -
Your first step to find an answer is to think for yourself rather than trying to get other people to do the thinking for you. Your second step is RTFM.
|
Re: GetWindowInfo -
Quote:
|
Re: GetWindowInfo -
Wow, Ancient Dragon for Win32 Wiz.
|
Re: GetWindowInfo -
Thanks for your posts! Could someone please explain how the operator & works? Also could Grumpy please tell me what the abbreviation stands for?
Thanks. |
Re: GetWindowInfo -
PcBrain, I hate to say it like this, but a lot of these questions you could be finding answers to more quickly by doing your own research. The
& operator is called the bitwise 'and' operator, and it evaluates the 'and' of each bit.:
00110101This can be used to quickly determine whether or not a bit is set. For instance, if x can contain any integer value, and we want to see if the third bit in x is set::
x = 13 // 13 is 00001101So in the context of window styles... I believe each style is represented by a different bit, and you can use a constants to isolate the bit for the style that the constant represents. |
Re: GetWindowInfo -
Ahh, I see.
So something like the following should return true right? - :
...Thanks. |
Re: GetWindowInfo -
yuck.
:
if (WNDI.dwStyle & WS_OVERLAPPED) { |
Re: GetWindowInfo -
Quote:
|
Re: GetWindowInfo -
My mistake, I probably threw off the op when I said:
y is 1 (True)(It was supposed to be y is 4 (True) as well...)In my example, the only reason I said 'True' is because it gives some meaning to the arbitrary value of 4. In a coding scenario, I agree that it's more readable to neglect the '== true'. Sorry about the confusion. |
| All times are GMT -5. The time now is 3:49 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC