Alert dialogs

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Blu_Matt.

Instead of using MessageRequester() function, should I use WinAPI calls to create dialogs with appropriate icons?

If anyone has sample code for this, I'd be highly appreciative.

Cheers,
Matt

"Do you program in Assembler?" she asked. "NOP," I replied.

Edited by - blu_matt on 07 February 2002 02:17:29
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by PB.

> Instead of using MessageRequester() function, should I use WinAPI calls to
> create dialogs with appropriate icons?

It depends if your app is for Windows only, or for Amiga and/or Linux as well.
The MessageRequester command supports all three platforms, but the MessageBox_
API is only for Windows.

Here is the format of the MessageBox_ API:

Code: Select all

MessageBox_(0,"body","title",flags)
Unfortunately there's too many flags to list here, so I won't bother... but if
you download the API-Guide program from http://www.allapi.net then you'll get
access to a lot of great API information.

> "Do you program in Assembler?" she asked. "NOP," I replied.

I like that!


PB - Registered PureBasic Coder

Edited by - PB on 07 February 2002 04:55:25
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Paul.

As PB says, there are quite a few flags you can use and they can be used with both the MessageBox_() command and PB's MessageRequester().

Here are a couple to get you started (they are Windows constants)

MessageRequester("title","message",#MB_ICONERROR) ...gives the red error icon

#MB_ICONINFORMATION ... gives the info/thought bubble icon
#MB_ICONQUESTION ... gives the question mark/thought bubble icon
#MB_ICONEXCLAMATION ... gives the yellow sign with exclamation mark
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by MrVainSCL.

Hi Blu-Matt
There are a lot of #flags for MessageBox_ , just download the WinAPI HelpFile with all infos of any API command and to have a complete list with all #flags for MessageBox_ like #MB_ICONSTOP ... You can you Sleep_(time) as replacement for Delay(time) ...

PIII450, 256MB Ram, 6GB HD, RivaTNT, DirectX8.1, SB AWE64, Win98SE + Updates...

greetz
MrVainSCL! aka Thorsten

Edited by - MrVainSCL on 07 February 2002 10:13:11
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Blu_Matt.

Thanks all for the replies :)

Much appreciated :)


"Do you program in Assembler?" she asked. "NOP," I replied.
Post Reply