Tip: MessageRequester Flags

Share your advanced PureBasic knowledge/code with the community.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Tip: MessageRequester Flags

Post by BackupUser »

Code updated for 5.20+

Restored from previous forum. Originally posted by Jose.

Code: Select all

;MessageRequester(Title$, Text$, Flags)

;The Flags parameter can be any of these values, 
;along with ones in the docs.

;#MB_ICONQUESTION
;#MB_ICONEXCLAMATION
;#MB_ICONASTERISK
;#MB_ICONWARNING
;#MB_ICONERROR
;#MB_ICONINFORMATION
;#MB_ICONSTOP

;Could we add these to the documentation...

;Try this little test:

MessageRequester("MessageRequester Icon", "Question is", #MB_ICONQUESTION)
MessageRequester("MessageRequester Icon", "Supprise!!!", #MB_ICONEXCLAMATION)
MessageRequester("MessageRequester Icon", "Info at last", #MB_ICONASTERISK)
MessageRequester("MessageRequester Icon", "Supprise 2!!!", #MB_ICONWARNING)
MessageRequester("MessageRequester Icon", "In Error", #MB_ICONERROR)
MessageRequester("MessageRequester Icon", "more Info", #MB_ICONINFORMATION)
MessageRequester("MessageRequester Icon", "Stop now", #MB_ICONSTOP)
Registered PureBasic User, 2.60-)
Last edited by fsw on Fri Aug 23, 2013 12:41 am, edited 1 time in total.
Reason: Code updated for 5.20+
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 Jose
Yes, you can add the win32 API #flags to have different icons on your "MessageRequester()" command... To optimize and have smaller programs, you can just use the pure API command instead the PureBasic command:

MessageBox_ (0,"InfCocoaMessage","WindowName",#MB_ICONINFORMATION|#MB_OK)

You can use some more API flags like #MB_OK : #MB_YESNO and some more... Have a look to the Win32 API help :wink:


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

greetz
MrVainSCL! aka Thorsten
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 blueb.

Good Tip Thorsten,

Sometimes you look....but you don't see. :)

--blueb
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.
;#MB_ICONQUESTION
;#MB_ICONEXCLAMATION
;#MB_ICONASTERISK
;#MB_ICONWARNING
;#MB_ICONERROR
;#MB_ICONINFORMATION
;#MB_ICONSTOP
;Could we add these to the documentation...
Not really, because the Amiga and Linux don't support these constants.
That's why MessageRequester uses its own cross-platforms equivalents of
these, such as #PB_MessageRequester_YesNo and so on.


PB - Registered PureBasic Coder
Post Reply