]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/curico.cpp
Had missed one LPSTR.
[wxWidgets.git] / src / msw / curico.cpp
index 9338e438fd4beca6c7ed2ba86ea82f6c2bc95065..dbf2c1cd68f43d7db4001ce69625438ce099816d 100644 (file)
@@ -216,7 +216,7 @@ HICON MakeIcon( HANDLE hDIB, HINSTANCE hInst)
                             lpDIB->bmiHeader.biBitCount)));
 
   // Get a hDC so we can create a bitmap compatible with it
-  hDC = CreateDC( "DISPLAY", NULL, NULL, NULL);
+  hDC = CreateDC( _T("DISPLAY"), NULL, NULL, NULL);
 
   // 5) Create a device dependent bitmap with the XOR bits.
   hbmXor = CreateDIBitmap( hDC, (LPBITMAPINFOHEADER)&(lpDIB->bmiHeader),
@@ -577,7 +577,7 @@ HCURSOR MakeCursor( HANDLE hDIB, LPPOINT lpptHotSpot, HINSTANCE hInst)
                            lpDIB->bmiHeader.biBitCount)));
 
   // Get a hDC so we can create a bitmap compatible with it
-  hDC = CreateDC( "DISPLAY", NULL, NULL, NULL);
+  hDC = CreateDC( _T("DISPLAY"), NULL, NULL, NULL);
 
   // 5) Create a device dependent bitmap with the XOR bits.
   hbmXor = CreateBitmap( (int )lpDIB->bmiHeader.biWidth,
@@ -820,10 +820,17 @@ HCURSOR MakeCursorFromBitmap(HINSTANCE hInst, HBITMAP hBitmap, POINT *pPoint)
   DeleteObject(hXorBmp);
   ReleaseDC(NULL, hDC);
 #ifndef __WIN32__
+#ifdef STRICT
+  LocalUnlock(LocalHandle((void NEAR*) andBits));
+  LocalUnlock(LocalHandle((void NEAR*) xorBits));
+  LocalFree(LocalHandle((void NEAR*) andBits));
+  LocalFree(LocalHandle((void NEAR*) xorBits));
+#else
   LocalUnlock(LocalHandle((WORD) andBits));
   LocalUnlock(LocalHandle((WORD) xorBits));
   LocalFree(LocalHandle((WORD) andBits));
   LocalFree(LocalHandle((WORD) xorBits));
+#endif
 #else
   LocalUnlock(LocalHandle((LPCVOID) andBits));
   LocalUnlock(LocalHandle((LPCVOID) xorBits));
@@ -891,10 +898,17 @@ HICON MakeIconFromBitmap(HINSTANCE hInst, HBITMAP hBitmap)
   DeleteObject(hXorBmp);
   ReleaseDC((HWND) NULL, hDC);
 #ifndef __WIN32__
+#ifdef STRICT
+  LocalUnlock(LocalHandle((void NEAR*) andBits));
+  LocalUnlock(LocalHandle((void NEAR*) xorBits));
+  LocalFree(LocalHandle((void NEAR*) andBits));
+  LocalFree(LocalHandle((void NEAR*) xorBits));
+#else
   LocalUnlock(LocalHandle((WORD) andBits));
   LocalUnlock(LocalHandle((WORD) xorBits));
   LocalFree(LocalHandle((WORD) andBits));
   LocalFree(LocalHandle((WORD) xorBits));
+#endif
 #else
   LocalUnlock(LocalHandle((LPCVOID) andBits));
   LocalUnlock(LocalHandle((LPCVOID) xorBits));