On Sat, 2007-10-06 at 21:18 +0200, Jacek M. Holeczek wrote: > Hi, > thanks for your patches. I was not able to use them directly (the patch > utility complained), so I had to implement these changes by hand. > > Unfortunately, now, when compiling, I get two warnings: > implicit declaration of function `ChangeDisplaySettingsExW' > implicit declaration of function `ShellExecuteExW' > and later the linker dies on undefined references to > `ChangeDisplaySettingsExW' and `ShellExecuteExW'.
I had to change one more thing, see the last part of the diff below (for
lines 4140 etc.).
That way, this sample compiles on my system :
#include <windows.h>
#include <winuser.h>
main()
{
ChangeDisplaySettingsEx(0, 0, 0, 0, 0);
ShellExecuteEx(0);
}
Cheers,
Danny
dannypc: {10} svn diff winuser.h
Index: winuser.h
===================================================================
--- winuser.h (revision 1061)
+++ winuser.h (working copy)
@@ -3390,12 +3390,16 @@
WINUSERAPI LRESULT WINAPI
CallWindowProcW(WNDPROC,HWND,UINT,WPARAM,LPARAM);
WINUSERAPI WORD WINAPI CascadeWindows(HWND,UINT,LPCRECT,UINT,const
HWND*);
WINUSERAPI BOOL WINAPI ChangeClipboardChain(HWND,HWND);
+#ifndef _WIN32_WCE
#ifndef NOGDI
-WINUSERAPI LONG WINAPI ChangeDisplaySettingsA(PDEVMODEA,DWORD);
+WINUSERAPI LONG WINAPI
ChangeDisplaySettingsA(PDEVMODEA,DWORD); /* A */
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
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
#define CreateDesktop CreateDesktopW
#define EnumDisplaySettings EnumDisplaySettingsW
#define EnumDisplaySettingsEx EnumDisplaySettingsExW
dannypc: {11}
> Best regards,
> Jacek.
--
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info
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
