mov eax,wParam

.IF ax==ButtonID
invoke Beep,NULL,NULL

When i use this code in response to the WM_COmmand it works fine

the only problem is it works too good

if i click the button for the ButtonID i get a Beep

problem is if i exit the program selecting "Exit" from the menu i get a Beep also....... but only after if i have clicked the button

there is no conflict with button or menu IDs

i dont get it

help appreciated
Posted on 2001-09-08 22:48:14 by titan
methinks maybe AX still is filled with the BUTTONID and maybe it hits the test again before it hits the exit? It is conjecture, perhaps you could post a little more of your code/structure?

one way to make sure it isn't as i guessed above... mov ax,0 after the beep invocation.

y not test with wParam instead of ax ?
Posted on 2001-09-08 23:05:58 by drarem
i tried to xor eax with eax and still had same problem

then tried the wParam method and it cleared things up

dont know why the xor thing would not do it

gonna bug me forever

thanx drarem
Posted on 2001-09-08 23:17:30 by titan