home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Shareware - Software Farm 2
/
wosw_2.zip
/
wosw_2
/
CPROG
/
CENVIW1.ZIP
/
MSGBOXES.CMM
< prev
next >
Wrap
Text File
|
1993-06-14
|
1KB
|
31 lines
/*************************************************************
*** MsgBoxes - Sample Cmm code to demonstrate uses of the ***
*** MessageBox() function. ***
*************************************************************/
#include <MsgBox.lib>
MessageBox("The following samples show various ways\n"
"to use the Windows MessageBox() function.\n"
"A wrapper for MessageBox() is located in\n"
"the Cmm library: \"MsgBox.lib\"",
"MsgBoxes - Welcome!");
MessageBox("This example only passes 1 parameter: the message string.");
MessageBox("This passes the message string and a title.","Here is the title.");
MessageBox("This example passes a zero-length string to get no title.","");
switch ( MessageBox("You can also offer different choices.\nPick one now...",
"MessageBox() choices",
MB_YESNOCANCEL) ) {
case IDYES: button = "Yes"; break;
case IDNO: button = "No"; break;
case IDCANCEL: button = "Cancel"; break;
}
sprintf(message,"You selected the %s button",button);
MessageBox(message,"");