CVS: winex/windows msgbox.c,1.3,1.4

[email protected]
Newsgroups gmane.comp.emulators.winex.cvs
Message-ID <[email protected]>
Subject: winex/windows msgbox.c,1.3,1.4Update of /var/lib/cvsd/cvsroot/winex/windows
In directory agravaine:/tmp/cvs-serv30809/windows

Modified Files:
	msgbox.c 
Log Message:
Provide a facility for the user driver to provide its own implementation of
MessageBox.  This allows us to use platform native dialogs for simple alerts
in some cases.

Also, sped up copy protection on some platforms by avoiding starting a 
console.


Index: msgbox.c
===================================================================
RCS file: /var/lib/cvsd/cvsroot/winex/windows/msgbox.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- msgbox.c	18 Feb 2004 22:27:51 -0000	1.3
+++ msgbox.c	30 Mar 2007 15:52:02 -0000	1.4
@@ -277,7 +277,12 @@
     HRSRC hRes;
     MSGBOXPARAMSA mbox;
 
-    WARN("Messagebox\n");
+    WARN("Messagebox: %s\n", text);
+
+    /* If the user driver has a MessageBox call, use that instead.  This allows
+       us to easily use native UI elements for simple messageboxes */
+    if (USER_Driver.pMessageBox)
+        return USER_Driver.pMessageBox(text, title, type);
 
     if(!(hRes = FindResourceA(GetModuleHandleA("USER32"), "MSGBOX", RT_DIALOGA)))
         return 0;
@@ -345,7 +350,7 @@
     HRSRC hRes;
 
     WARN("Messagebox\n");
-
+    
     if(!(hRes = FindResourceA(GetModuleHandleA("USER32"), "MSGBOX", RT_DIALOGA)))
         return 0;
     if(!(template = (LPVOID)LoadResource(GetModuleHandleA("USER32"), hRes)))
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.