Msg Boxes.......

Hi there,



I have some basic ASM knowledge and am starting to program Win32ASM.

I have a question though:



How do I make a Msg box that will create another Msg box depending on

what button is pressed???



-------------[ Mah code ]----------------

start:

Title1 db "20 QUESTIONS:",0

Text1 db "Blah blah....",0

invoke MessageBox,0,ADDR Text1,ADDR Title1,MB_YESNO

.if eax == IDNO

jmp no1

.endif

yes1:

Text2 db "Blah blah.....",0

invoke MessageBox,0,ADDR Text2,ADDR Title1,MB_YESNO

.if eax == IDNO

jmp no2

.endif

--------------------------------------------



Am I missin somethin after tha .endif??? Do I have to kill tha 1st Msg box

before I create tha 2nd???



Please help,

*unknown*


Comments

  • Hmmm, I don't know a lot about ASM but it's the same for the Win API. I'm not sure that you know this or not, but it would be easier for you to use Dialog Boxes instead of message boxes as you can't call anything from a message box ( or as much as I know ).




  • AfterDeath is right. If you use a Dialog box, you can check EAX for WM_COMMAND, and from there check for IDYES, IDNO and such (i think). Dialogs are just about as easy as MsgBoxs, justa few more lines. I donno about MASM though, I use TASM :)



    : Hmmm, I don't know a lot about ASM but it's the same for the Win API. I'm not sure that you know this or not, but it would be easier for you to use Dialog Boxes instead of message boxes as you can't call anything from a message box ( or as much as I know ).

    :

    :






  • Yeah........I figured it out.......you do check EAX for IDYES, ect.



    Thanx a bunch,

    *unknown*




Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories