Hey can anyone figure out why any of my code runs twice? i have only noticed it from clicking on a button as my code from button clicks usually shows a message box or something but when i click on a button i get 2 message boxes instead of one and this happens with lots of other code.
Posted on 2001-10-19 05:38:01 by Kezza
Hi Kezza

If this happends in a dialogbox maybe you forgot to return
TRUE on messages you handle.

Posted on 2001-10-19 05:47:20 by KetilO
okkk then
so how do i do this?
Posted on 2001-10-19 05:53:10 by Kezza
Hi Kezza

Here is a simple RadASM project showing the basics of a dialogbox.

Posted on 2001-10-19 06:43:14 by KetilO
um my program isnt running from a dialog box.. its a normal window and all code that is ran by clicking a button runs twice
i have the following code (snippet)

mov eax,wParam
.if ax==IDB_OK
invoke MessageBox,hWnd,TxtOK,TxtOK,MB_OK
.elseif ax==IDM_EXIT
invoke PostQuitMessage,NULL
Posted on 2001-11-02 01:52:48 by Kezza
possibly your buttons have the BS_NOTIFY style on. With this bit, your button receives more messages (BN_SETFOCUS for example). Just a guess.
Posted on 2001-11-03 13:14:43 by japheth
hi japheth you were right.. i got it working now :)
Posted on 2001-11-03 19:18:02 by Kezza