MessageBoxA?

BlitzMax Forums/MaxGUI Module/MessageBoxA?

William Drescher(Posted 2008) [#1]
Could someone please tell me how to use the MessageBoxA() command? I put in the extern code and the message box appears but the text and title are...not right.


SebHoll(Posted 2008) [#2]
How's this?

Strict

Extern "win32"
	Function MessageBoxW( hwnd, lpText$w, lpCaption$w, uType )
EndExtern


MessageBoxW( Null, "Message body text!", "Titlebar Text", 0 )
When accessing the Windows API in BlitzMax, you may as well use the unicode (wide-character) implementations of the functions which have a 'W' suffix instead of 'A' unless you are planning on running your programs on Windows 9X/Me.


William Drescher(Posted 2008) [#3]
I know this post is old, but all I get is wierd characters no matter what I put into the parts.


jsp(Posted 2008) [#4]
Works here as expected. Did you use the syntax above or did you try the MassageBoxA with Unicode character? That would give strange output.