News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

MessageBox help

Started by maruf10, April 08, 2010, 02:59:46 PM

Previous topic - Next topic

maruf10

Hello all ....

How can i create custom MessageBox ??
There will be two button "OK" and "CANCEL" and a string ..
Pressing OK will call a function and pressing CANCEL will exit the code ....
how can i do this ??

an off topic
i use
Quote
echo some text >> a.txt
to append some text in a.txt ... what is the system to do the same using masm32  ??

Thanks in advance

Ghandi

Instead of a message box, consider using a dialog box, you can make it however you want.

HR,
Ghandi

Slugsnack

http://msdn.microsoft.com/en-us/library/ms645505(VS.85).aspx
set uType as MB_OKCANCEL then check the return value after you call the function.

for string concatentation, you could use the crt function strcat() or you could use the masm32 function szappend() or szCatStr()

qWord

.if rv(MessageBox,0,"bla","bla",MB_OKCANCEL) == IDOK
; OK-Button
call YourProc
.endif
FPU in a trice: SmplMath
It's that simple!

Slugsnack

Quote from: qWord on April 08, 2010, 03:32:48 PM
.if rv(MessageBox,0,"bla","bla",MB_OKCANCEL) == IDOK
; OK-Button
call YourProc
.endif

you mean :
MessageBox,0,chr$("bla"),chr$("bla"),MB_OKCANCEL

qWord

Quote from: Slugsnack on April 08, 2010, 03:34:35 PM
you mean :
MessageBox,0,chr$("bla"),chr$("bla"),MB_OKCANCEL
no - string literals are supported by rv-macro (and fn)
FPU in a trice: SmplMath
It's that simple!

Slugsnack

Quote from: qWord on April 08, 2010, 03:43:37 PM
Quote from: Slugsnack on April 08, 2010, 03:34:35 PM
you mean :
MessageBox,0,chr$("bla"),chr$("bla"),MB_OKCANCEL
no - string literals are supported by rv-macro (and fn)

haha pretty cool   :bg