Re: Display BM_GETSTATE?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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



.



Relevant Pages

  • Re: Display BM_GETSTATE?
    ... These are all listed in the documentation that came with your compiler. ... I think the watch window only changes when you hit a breakpoint. ... Debug mode (you can get details by typing OutputDebugString in the search ... OutputDebugString only writes text strings, ...
    (microsoft.public.vc.language)
  • Re: OED
    ... >I did watch, and was mildly amused so will possibly watch again, but I ... >didn't really think it was an ideal WWP programme.. ... >very well to see the documentation, the extra information that could be ... >been better on the radio, ...
    (uk.media.radio.archers)
  • Re: Coding convention
    ... You'd use comments to highlight the fact that you have to watch out for ... where you freaked with the syntax and did something not recommended by the ... the developer would insert the break... ... > Good documentation, as mentioned before, can be used to indicate pitfalls ...
    (alt.php)
  • Re: cheap casio analog "selector button" ?
    ... I emailed Casio support and they had no info - see email reply below ... Thank you for yoru inquiry. ... We have nothing in the documentation that ... curious as to function of button at 2 o'clock position on this watch. ...
    (alt.horology)
  • Re: Generating XML file for NDoc
    ... documentation is often a rotten by amateurs written program. ... watch that his program is good readable by the compiler and by humans. ... Cor ...
    (microsoft.public.dotnet.languages.csharp)