__WINE__ interfering with Unicode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





Consider the following piece of code:

cls.hIcon         = LoadIconW (0, IDI_APPLICATIONW);

It compiles just fine in Wine, but:
 * IDI_APPLICATIONW does not exist on Windows. On Windows one is
supposed to use IDI_APPLICATION.
 * but if __WINE__ is defined, use of IDI_APPLICATION is forbidden

So what I propose is to change Maketest.rules.in to drop the __WINE__
(see a previous patch). Then change the test to use IDI_APPLICATION. And
finally cast it because it is going to be the ANSI version unless we
define UNICODE which I don't think would be appropriate. But in this
case it really does not matter sicne this is not really a string.

This is not very clean so I'm open to other suggestions (define our
own IDI_APPLICATION?).


Changelog:

 * dlls/user/tests/class.c

   IDI_APPLICATIONW does not exist on Windows. Use IDI_APPLICATION
instead and cast to LPWSTR.


Index: dlls/user/tests/class.c
===================================================================
RCS file: /home/wine/wine/dlls/user/tests/class.c,v
retrieving revision 1.3
diff -u -r1.3 class.c
--- dlls/user/tests/class.c	22 Jun 2002 00:08:10 -0000	1.3
+++ dlls/user/tests/class.c	16 Sep 2002 09:27:19 -0000
@@ -52,8 +52,8 @@
     cls.cbClsExtra    = NUMCLASSWORDS*sizeof(DWORD);
     cls.cbWndExtra    = 12;
     cls.hInstance     = hInstance;
-    cls.hIcon         = LoadIconW (0, IDI_APPLICATIONW);
-    cls.hCursor       = LoadCursorW (0, IDC_ARROWW);
+    cls.hIcon         = LoadIconW (0, (LPWSTR)IDI_APPLICATION);
+    cls.hCursor       = LoadCursorW (0, (LPWSTR)IDC_ARROW);
     cls.hbrBackground = GetStockObject (WHITE_BRUSH);
     cls.lpszMenuName  = 0;
     cls.lpszClassName = className;



-- 
Francois Gouget         fgouget@free.fr        http://fgouget.free.fr/
     We are Pentium of Borg. You will be approximated. Division is futile.



[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux