Re: Display BM_GETSTATE?
- From: "Robby" <Robby@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 16 Feb 2006 19:21:49 -0800
Hi John,
OOOFFF! I think I have enough on my plate right now! :-)
Anyhow, I highlighted BM_GETSTATE and gave me the following defines that
can be returned :
#define BST_UNCHECKED 0x0000
#define BST_CHECKED 0x0001
#define BST_INDETERMINATE 0x0002
#define BST_PUSHED 0x0004
#define BST_FOCUS 0x0008
However I only see 5 of them. I am sure your link shows the 6 of them that
you claim.
As far as the watch window is concerned, usually when I am in the same
function of whatever I am watching, the changes are displayed, I don't know
either if it has to hit the break point or not... I don't think so....
because now it works .... !!!!! I don't know what I did, but now I am able to
watch x change.
Thanks John... and I wish you a good evening, if your in eastern Time zone :-)
--
Best regards
Robert
"John Carson" wrote:
"Robby" <Robby@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message.
news:FB949A20-E047-4BAF-9DD6-5ED2A0F199E3@xxxxxxxxxxxxx
Hi John!
It works!
I didn't know that BM_GETSTATE returns 6 possible values, and I
don't even know if Petzold talks about these values or if it is
mentioned in future chapters, I hope it is, because I am curious to
know what all the values are.
These are all listed in the documentation that came with your compiler. The
documentation is also available online at
http://msdn.microsoft.com/library/default.asp
The total amount of documentation is gigantic and it takes a while to learn
how to navigate it (most of the documentation you will never need to look
at). If, however, you simply type in BM_GETSTATE in the search box for the
online documentation, the first "hit" gives you the information you need.
Also, thanks for pointing out that when we re-size, a Paint message
arises and at this point the owner-drawn button sends out a
WM_DRAWITEM message whereby x would again be reset(FALSE). Now that I
modified the program with your lines, we do it only if its a
WM_COMMAND message.
I guess that a WM_COMMAND message is not sent when we re-size. I am
getting to the section of owner-draw button, I guess this will be all
explained!
One last thing.... If you run this program, and put x in the watch
window, it always reflects TRUE. Shouldn't it change from TRUE to
FALSE?
The reson is, I would of really liked to follow the value of x as I
do some re-sizing and clicking.
I think the watch window only changes when you hit a breakpoint. If you want
to watch changes as the program is running, then the thing to use is
OutputDebugString which will write to the Output window when running in
Debug mode (you can get details by typing OutputDebugString in the search
box of the online documenation). OutputDebugString only writes text strings,
so if you want to output numbers, you first need to call some function to
put the numbers into a string (e.g., _stprintf or, for a C++ approach, a
stringstream object).
--
John Carson
- Follow-Ups:
- Re: Display BM_GETSTATE?
- From: John Carson
- Re: Display BM_GETSTATE?
- References:
- Display BM_GETSTATE?
- From: Robby
- Re: Display BM_GETSTATE?
- From: John Carson
- Re: Display BM_GETSTATE?
- From: Robby
- Re: Display BM_GETSTATE?
- From: John Carson
- Re: Display BM_GETSTATE?
- From: Robby
- Re: Display BM_GETSTATE?
- From: John Carson
- Display BM_GETSTATE?
- Prev by Date: Re: trying to parse an array and pass to a stack but I hit a snag
- Next by Date: Re: Display BM_GETSTATE?
- Previous by thread: Re: Display BM_GETSTATE?
- Next by thread: Re: Display BM_GETSTATE?
- Index(es):
Relevant Pages
|