Update of /cvsroot/htoolkit/port/src/cbits/Win32
In directory sc8-pr-cvs1:/tmp/cvs-serv15641/src/cbits/Win32
Modified Files:
Message.c
Log Message:
Add new message box types. Haddock style comments are provided.
Index: Message.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Message.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Message.c 3 Mar 2003 21:19:42 -0000 1.1
--- Message.c 14 Mar 2003 17:14:56 -0000 1.2
***************
*** 2,10 ****
#include "Internals.h"
! void osMessageInfo(char *szText)
{
MessageBox(GetActiveWindow(), szText, gAppName, MB_OK | MB_ICONINFORMATION);
};
void osMessageWarning(char *szText)
{
--- 2,15 ----
#include "Internals.h"
! void osMessageAlert(char *szText)
{
MessageBox(GetActiveWindow(), szText, gAppName, MB_OK | MB_ICONINFORMATION);
};
+ BOOL osMessageConfirm(char *szText)
+ {
+ return (MessageBox(GetActiveWindow(), szText, gAppName, MB_OKCANCEL | MB_ICONINFORMATION) == IDOK);
+ };
+
void osMessageWarning(char *szText)
{
***************
*** 21,22 ****
--- 26,47 ----
return (MessageBox(GetActiveWindow(), szText, gAppName, MB_OKCANCEL | MB_ICONERROR) == IDOK);
};
+
+ int osMessageCancelQuestion(char *szText)
+ {
+ switch (MessageBox(GetActiveWindow(), szText, gAppName, MB_YESNO | MB_ICONQUESTION))
+ {
+ case IDNO: return 0;
+ case IDYES: return 1;
+ default: return -1;
+ }
+ };
+
+ int osMessageConfirmSave(char *szText)
+ {
+ switch (MessageBox(GetActiveWindow(), szText, gAppName, MB_YESNO | MB_ICONQUESTION))
+ {
+ case IDNO: return 0;
+ case IDYES: return 1;
+ default: return -1;
+ }
+ };
\ No newline at end of file
|