Hi,
thanks, very much for your help.
Please find attached a mingw32ce patch which solves my problems (the
diffs were made against the current cegcc-mingw32ce-0.50 version).
There are three files which need to be patched:
1. winuser.h - this patch solves my "ChangeDisplaySettings" problem (note
that it is an "improved" version of your patch, in particular the order
of "#ifndef NOGDI" and "#ifndef _WIN32_WCE" is reversed; I believe that
the NOGDI flag should "block" "ChangeDisplaySettings" in any case, not
only when _WIN32_WCE is not defined)
2. shellapi.h - this patch solves my "ShellExecuteEx" problem (note again
that it is an "improved" version of your patch from some days ago)
3. wingdi.h - this patch properly defines the "DEVMODEW" structure on a
_WIN32_WCE machine, and it also defines some missing "constants"
All patches have been tested by me, the compiled code is working fine.
Hope it helps,
Best regards,
Jacek.
===============================================================================
--- winuser.h.orig 2007-06-19 18:55:56.000000000 +0200
+++ winuser.h 2007-10-10 12:01:37.000000000 +0200
@@ -3391,11 +3391,15 @@
WINUSERAPI WORD WINAPI CascadeWindows(HWND,UINT,LPCRECT,UINT,const HWND*);
WINUSERAPI BOOL WINAPI ChangeClipboardChain(HWND,HWND);
#ifndef NOGDI
+#ifndef _WIN32_WCE
WINUSERAPI LONG WINAPI ChangeDisplaySettingsA(PDEVMODEA,DWORD);
WINUSERAPI LONG WINAPI ChangeDisplaySettingsW(PDEVMODEW,DWORD);
WINUSERAPI LONG WINAPI
ChangeDisplaySettingsExA(LPCSTR,LPDEVMODEA,HWND,DWORD,LPVOID);
WINUSERAPI LONG WINAPI
ChangeDisplaySettingsExW(LPCWSTR,LPDEVMODEW,HWND,DWORD,LPVOID);
-#endif
+#else /* _WIN32_WCE */
+WINUSERAPI LONG WINAPI
ChangeDisplaySettingsEx(LPCWSTR,LPDEVMODEW,HWND,DWORD,LPVOID);
+#endif /* _WIN32_WCE */
+#endif /* NOGDI */
WINUSERAPI BOOL WINAPI ChangeMenuA(HMENU,UINT,LPCSTR,UINT,UINT);
WINUSERAPI BOOL WINAPI ChangeMenuW(HMENU,UINT,LPCWSTR,UINT,UINT);
WINUSERAPI LPSTR WINAPI CharLowerA(LPSTR);
@@ -4240,8 +4244,10 @@
#ifndef NOGDI
typedef ICONMETRICSW ICONMETRICS,*LPICONMETRICS;
typedef NONCLIENTMETRICSW NONCLIENTMETRICS,*LPNONCLIENTMETRICS;
+#ifndef _WIN32_WCE
#define ChangeDisplaySettings ChangeDisplaySettingsW
#define ChangeDisplaySettingsEx ChangeDisplaySettingsExW
+#endif /* _WIN32_WCE */
#define CreateDesktop CreateDesktopW
#define EnumDisplaySettings EnumDisplaySettingsW
#define EnumDisplaySettingsEx EnumDisplaySettingsExW
===============================================================================
--- shellapi.h.orig 2007-06-19 18:55:56.000000000 +0200
+++ shellapi.h 2007-10-08 14:17:28.000000000 +0200
@@ -297,10 +297,14 @@
BOOL WINAPI Shell_NotifyIconW(DWORD,PNOTIFYICONDATAW);
int WINAPI ShellAboutA(HWND,LPCSTR,LPCSTR,HICON);
int WINAPI ShellAboutW(HWND,LPCWSTR,LPCWSTR,HICON);
+#ifndef _WIN32_WCE
HINSTANCE WINAPI ShellExecuteA(HWND,LPCSTR,LPCSTR,LPCSTR,LPCSTR,INT);
HINSTANCE WINAPI ShellExecuteW(HWND,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR,INT);
BOOL WINAPI ShellExecuteExA(LPSHELLEXECUTEINFOA);
BOOL WINAPI ShellExecuteExW(LPSHELLEXECUTEINFOW);
+#else /* _WIN32_WCE */
+BOOL WINAPI ShellExecuteEx(LPSHELLEXECUTEINFOW);
+#endif /* _WIN32_WCE */
int WINAPI SHFileOperationA(LPSHFILEOPSTRUCTA);
int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW);
void WINAPI SHFreeNameMappings(HANDLE);
@@ -332,8 +336,10 @@
#define FindExecutable FindExecutableW
#define Shell_NotifyIcon Shell_NotifyIconW
#define ShellAbout ShellAboutW
+#ifndef _WIN32_WCE
#define ShellExecute ShellExecuteW
#define ShellExecuteEx ShellExecuteExW
+#endif /* _WIN32_WCE */
#define SHFileOperation SHFileOperationW
#define SHGetFileInfo SHGetFileInfoW
#define SHQueryRecycleBin SHQueryRecycleBinW
===============================================================================
--- wingdi.h.orig 2007-06-19 18:55:56.000000000 +0200
+++ wingdi.h 2007-10-10 13:17:06.000000000 +0200
@@ -1182,10 +1182,20 @@
#define DM_PELSHEIGHT 0x00100000
#define DM_DISPLAYFLAGS 0x00200000
#define DM_DISPLAYFREQUENCY 0x00400000
+#ifndef _WIN32_WCE
#define DM_ICMMETHOD 0x00800000
#define DM_ICMINTENT 0x01000000
#define DM_MEDIATYPE 0x02000000
#define DM_DITHERTYPE 0x04000000
+#else /* _WIN32_WCE */
+#define DM_DISPLAYORIENTATION 0x00800000
+#define DM_DISPLAYQUERYORIENTATION 0x01000000
+#define DMDO_0 0
+#define DMDO_DEFAULT DMDO_0
+#define DMDO_90 1
+#define DMDO_180 2
+#define DMDO_270 4
+#endif /* _WIN32_WCE */
#if(WINVER >= 0x0500)
#define DM_PANNINGWIDTH 0x08000000
#define DM_PANNINGHEIGHT 0x10000000
@@ -1523,6 +1533,7 @@
#endif
#endif /* WINVER >= 0x0400 */
} DEVMODEA,*LPDEVMODEA,*PDEVMODEA;
+#ifndef _WIN32_WCE
typedef struct _devicemodeW {
WCHAR dmDeviceName[CCHDEVICENAME];
WORD dmSpecVersion;
@@ -1574,6 +1585,37 @@
#endif
#endif /* WINVER >= 0x0400 */
} DEVMODEW,*LPDEVMODEW,*PDEVMODEW;
+#else /* _WIN32_WCE */
+typedef struct _devicemodeW {
+ WCHAR dmDeviceName[CCHDEVICENAME];
+ WORD dmSpecVersion;
+ WORD dmDriverVersion;
+ WORD dmSize;
+ WORD dmDriverExtra;
+ DWORD dmFields;
+ short dmOrientation;
+ short dmPaperSize;
+ short dmPaperLength;
+ short dmPaperWidth;
+ short dmScale;
+ short dmCopies;
+ short dmDefaultSource;
+ short dmPrintQuality;
+ short dmColor;
+ short dmDuplex;
+ short dmYResolution;
+ short dmTTOption;
+ short dmCollate;
+ WCHAR dmFormName[CCHFORMNAME];
+ WORD dmLogPixels;
+ DWORD dmBitsPerPel;
+ DWORD dmPelsWidth;
+ DWORD dmPelsHeight;
+ DWORD dmDisplayFlags;
+ DWORD dmDisplayFrequency;
+ DWORD dmDisplayOrientation;
+} DEVMODEW,*PDEVMODEW,*NPDEVMODEW,*LPDEVMODEW;
+#endif /* _WIN32_WCE */
typedef struct tagDIBSECTION {
BITMAP dsBm;
BITMAPINFOHEADER dsBmih;
===============================================================================
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel