Kevin O'Connor wrote:
I did need to apply the following patch to winuser.h to get it to
compile okay.  I just cut and paste the relavent code from the
videolan files - I don't really know whether it is correct or not.

Thanks,
-Kevin


--- w32api/include/winuser.h    (revision 750)
+++ w32api/include/winuser.h    (working copy)
@@ -3463,14 +3463,24 @@
 WINUSERAPI BOOL WINAPI DestroyIcon(HICON);
 WINUSERAPI BOOL WINAPI DestroyMenu(HMENU);
 WINUSERAPI BOOL WINAPI DestroyWindow(HWND);
+#ifdef UNDER_CE
+#define DialogBoxParamA(i, t, p, f, o)    \
+    DialogBoxIndirectParamA(i,   \
+ (LPCDLGTEMPLATE)LoadResource(i, FindResource(i, t, RT_DIALOG)), p, f, o)
+#define DialogBoxParamW(i, t, p, f, o)    \
+    DialogBoxIndirectParamW(i,   \
+ (LPCDLGTEMPLATE)LoadResource(i, FindResource(i, t, RT_DIALOG)), p, f, o)
+#endif

Since DialogBoxParamW isn't exported from coredll.dll, but the MSDN docs say it is,
Then it must be a #defined to something else indeed.
VLC's version does look like a pretty good implementation based on info from:
http://windowssdk.msdn.microsoft.com/en-us/library/ms632588.aspx
http://windowssdk.msdn.microsoft.com/en-us/library/ms645461.aspx
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/WindowsUserInterface/Resources/IntroductiontoResources/ResourceReference/resourcetypes.asp
http://msdn2.microsoft.com/en-us/library/aa452950.aspx

From MSDN:
The *DialogBoxParam* function creates a modal dialog box from a dialog box template resource (snip) The *DialogBoxIndirectParam* function creates a modal dialog box from a dialog box template in memory (snip)

Just a couple remarks:
There is no DialogBoxIndirectParamA in WinCE, so the Ansi version will never work.
For w32api/include, we use _WIN32_WCE not UNDER_CE to check for WinCE.
UNDER_CE is defined, but not to any meaningful value.

I therefore committed the attached patch.

Thansks,

Cheers,
Pedro Alves
---

src/w32api/ChangeLog.ce:

2006-10-29  Kevin O'Connor  <[EMAIL PROTECTED]>
* include/winuser.h (DialogBoxParamW): Implement on terms of DialogBoxIndirectParamW.

Index: winuser.h
===================================================================
--- winuser.h   (revision 757)
+++ winuser.h   (working copy)
@@ -3472,8 +3472,12 @@
 #define DialogBoxIndirectW(i,t,p,f) DialogBoxIndirectParamW(i,t,p,f,0)
 WINUSERAPI int WINAPI 
DialogBoxIndirectParamA(HINSTANCE,LPCDLGTEMPLATE,HWND,DLGPROC,LPARAM);
 WINUSERAPI int WINAPI 
DialogBoxIndirectParamW(HINSTANCE,LPCDLGTEMPLATE,HWND,DLGPROC,LPARAM);
+#ifdef _WIN32_WCE
+#define DialogBoxParamW(i,t,p,f,o) DialogBoxIndirectParamW(i, 
(LPCDLGTEMPLATE)LoadResource(i, FindResource(i, t, RT_DIALOG)), p, f, o)
+#else
 WINUSERAPI int WINAPI DialogBoxParamA(HINSTANCE,LPCSTR,HWND,DLGPROC,LPARAM);
 WINUSERAPI int WINAPI DialogBoxParamW(HINSTANCE,LPCWSTR,HWND,DLGPROC,LPARAM);
+#endif
 WINUSERAPI LONG WINAPI DispatchMessageA(const MSG*);
 WINUSERAPI LONG WINAPI DispatchMessageW(const MSG*);
 WINUSERAPI int WINAPI DlgDirListA(HWND,LPSTR,int,int,UINT);
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel

Reply via email to