Another way to code this might be the patch I'm attaching now. It removes the duplicate definition which is on MSDN but instead merges the differences.
Danny
On Fri, 2007-10-12 at 15:31 +0200, Jacek M. Holeczek wrote:
> > I don't see anything fundamentally different on the non-CE version,
>
> Well, I do.
> Any attempt to call the "ChangeDisplaySettingsEx" with use of the "non-CE"
> DEVMODE version (as you name it) returns an error. After many many hours
> of fights ... I discovered that the DEVMODEW structure was completely
> different from what WinCE expected. After I "patched" it, my code started
> to work.
>
> I do NOT have any development tools from Microsoft. Everything I've
> learned about this structure comes from publicly available sources.
> For your convenience, I've just collected below a set of WWW pages from
> the Microsoft Embedded Developer Center:
> Windows CE 1.0 (?) http://msdn2.microsoft.com/en-us/library/ms931101.aspx
> Windows CE 2.0 - I cannot find any article about it
> Windows CE 3.0 http://msdn2.microsoft.com/en-us/library/ms960191.aspx
> Windows CE .NET 4.2 http://msdn2.microsoft.com/en-us/library/ms896928.aspx
> Windows CE 5.0 http://msdn2.microsoft.com/en-us/library/ms898295.aspx
> Windows Mobile 6 http://msdn2.microsoft.com/en-us/library/aa930878.aspx
> As you can see, the structure has NOT change a bit, has it?
>
> I'm sorry, but I cannot give you any better assistance.
> I have never been writing any single ms-windows application before.
>
> Hope it helps,
> Best regards,
> Jacek.
>
> -------------------------------------------------------------------------
> 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
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/cegcc-devel
--
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info
Index: wingdi.h
===================================================================
--- wingdi.h (revision 1062)
+++ wingdi.h (working copy)
@@ -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
@@ -1530,8 +1540,10 @@
WORD dmSize;
WORD dmDriverExtra;
DWORD dmFields;
+#ifndef _WIN32_WCE
_ANONYMOUS_UNION union {
_ANONYMOUS_STRUCT struct {
+#endif
short dmOrientation;
short dmPaperSize;
short dmPaperLength;
@@ -1540,12 +1552,13 @@
short dmCopies;
short dmDefaultSource;
short dmPrintQuality;
+#ifndef _WIN32_WCE
} DUMMYSTRUCTNAME;
POINTL dmPosition;
DWORD dmDisplayOrientation;
DWORD dmDisplayFixedOutput;
} DUMMYUNIONNAME;
-
+#endif
short dmColor;
short dmDuplex;
short dmYResolution;
@@ -1556,11 +1569,18 @@
DWORD dmBitsPerPel;
DWORD dmPelsWidth;
DWORD dmPelsHeight;
+#ifdef _WIN32_WCE
+ DWORD dmDisplayFlags;
+#else
_ANONYMOUS_UNION union {
DWORD dmDisplayFlags;
DWORD dmNup;
} DUMMYUNIONNAME2;
+#endif
DWORD dmDisplayFrequency;
+#ifdef _WIN32_WCE
+ DWORD dmDisplayOrientation;
+#else
#if(WINVER >= 0x0400)
DWORD dmICMMethod;
DWORD dmICMIntent;
@@ -1573,6 +1593,7 @@
DWORD dmPanningHeight;
#endif
#endif /* WINVER >= 0x0400 */
+#endif /* _WIN32_WCE */
} DEVMODEW,*LPDEVMODEW,*PDEVMODEW;
typedef struct tagDIBSECTION {
BITMAP dsBm;
signature.asc
Description: This is a digitally signed message part
------------------------------------------------------------------------- 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 [email protected] https://lists.sourceforge.net/lists/listinfo/cegcc-devel
