this is a relitavly simple problem so i dont know a search would come up with right things
well you see i'm
invoke MessageBox, NULL , ADDR MsgText, ADDR MsgTitle, MB_OK or MB_ICONINFORMATION

it comes up, but isnt the forground window, it shows up in task bar burried by all the other windows; and i have to minmize all other windows to make it come up. how do i get it so that its always ontop/forground, also if there any way to resume executing code after the message box comes up?
Posted on 2002-05-09 17:07:45 by Qages
Do you have a window (even an invisible one)?

If you do then the problem is much easier to deal with...
If you just have a messagebox and no window is created then I'm not as sure of the answer...

Sliver
Posted on 2002-05-09 17:14:23 by Sliver
no windoes at all, just code and messagebox
Posted on 2002-05-09 17:15:43 by Qages
Assign it to a window, and use the MB_APPMODAL param as well (or what ever its real name is).

NaN
Posted on 2002-05-09 17:18:22 by NaN
dont know why you are having the problem you are having but try the this:
invoke MessageBox,0, ADDR MsgText, ADDR MsgTitle, MB_OK + MB_ICONINFORMATION + MB_TOPMOST


look at the messagebox api reference. there are numerous other parameters you can use too.
Posted on 2002-05-09 17:20:21 by smurf
Ok here is a glorified way to continue execution of your application even if the messagebox is present...

I guess you could have a global variable to find out the state of what button the client pushed (in this example I just used MB_OK)



invoke CreateThread,0,0,offset DisplayMessageBox, Arguments, 0, addr Temp

DisplayMessageBox proc MessageText:dword
.data
szMsg db "Message Box",0
.code
invoke MessageBox,0,MessageText,addr szMsg,MB_OK
ret
DisplayMessage endp

Posted on 2002-05-09 17:22:54 by Sliver
well that seems a bit hard to do, i dont want to bugg you anymore as that isnt really nessasary
Posted on 2002-05-09 17:31:26 by Qages
Sliver code should work, always if you change invoke MessageBox,0,MessageText,addr szMsg,MB_OK by invoke MessageBox,0,addr MessageText,addr szMsg,MB_OK and you put a string in MessageText.
Posted on 2002-05-09 20:46:41 by CodeLover
Yeah, getting it topmost isnt really all that hard, just an extra param. Now getting it to popup where you want it to can be a pain sometimes. Never did like the default position of screen center for all applications. Its much better sometimes when you can place it, like font dialog aligned with a font picker button or some such...
Posted on 2002-05-10 09:01:31 by Graebel