X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/65fd5cb0124e62ab1fc41f93382a205d95b00e75..6342bd1ab36c1957684c00d408d09fba65d33db6:/src/msw/curico.cpp diff --git a/src/msw/curico.cpp b/src/msw/curico.cpp index 5bd16e67a0..c8df51825e 100644 --- a/src/msw/curico.cpp +++ b/src/msw/curico.cpp @@ -24,10 +24,8 @@ #include #endif -#ifndef __TWIN32__ -#if defined (__GNUWIN32__) && !defined(wxUSE_NORLANDER_HEADERS) -#include "wx/msw/gnuwin32/extra.h" -#endif +#ifdef __GNUWIN32_OLD__ + #include "wx/msw/gnuwin32/extra.h" #endif #include "wx/wxchar.h" @@ -101,7 +99,7 @@ HANDLE ReadIcon( wxChar *szFileName, int *W, int *H) nDirEntries = 0; // Open and read the .ICO file header and the first ICONFILERES - hFile = _lopen( wxFNCONV(szFileName), OF_READ); + hFile = _lopen( wxConvertWX2MB(szFileName), OF_READ); cbHead = _lread( hFile, (LPSTR)&iconFileHead, sizeof(ICONFILEHEADER)); cbRes = _lread( hFile, (LPSTR)&iconFileRes, sizeof(ICONFILERES)); ++nDirEntries; @@ -113,7 +111,7 @@ HANDLE ReadIcon( wxChar *szFileName, int *W, int *H) return (HANDLE) NULL; // inserted by P.S. - while( (nDirEntries < iconFileHead.wResourceCount) && + while( ((unsigned)nDirEntries < iconFileHead.wResourceCount) && ((iconFileRes.bWidth != nWidth) || (iconFileRes.bHeight != nHeight))) { cbRes = _lread( hFile, (LPSTR )&iconFileRes, sizeof( ICONFILERES)); @@ -218,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( _T("DISPLAY"), NULL, NULL, NULL); + hDC = CreateDC( wxT("DISPLAY"), NULL, NULL, NULL); // 5) Create a device dependent bitmap with the XOR bits. hbmXor = CreateDIBitmap( hDC, (LPBITMAPINFOHEADER)&(lpDIB->bmiHeader), @@ -348,7 +346,7 @@ HANDLE ReadCur( wxChar *szFileName, LPPOINT lpptHotSpot, int *W, int *H) nDirEntries = 0; // Open and read the .ICO file header and the first ICONFILERES - hFile = _lopen( wxFNCONV(szFileName), OF_READ); + hFile = _lopen( wxConvertWX2MB(szFileName), OF_READ); cbHead = _lread( hFile, (LPSTR )&curFileHead, sizeof( CURFILEHEADER)); cbRes = _lread( hFile, (LPSTR )&curFileRes, sizeof( CURFILERES)); ++nDirEntries; @@ -361,7 +359,7 @@ HANDLE ReadCur( wxChar *szFileName, LPPOINT lpptHotSpot, int *W, int *H) return (HANDLE) NULL; // following added by P.S. - while( (nDirEntries < curFileHead.wResourceCount) && + while( ((unsigned)nDirEntries < curFileHead.wResourceCount) && ((curFileRes.bWidth != nWidth) || (curFileRes.bHeight != nHeight))) { cbRes = _lread( hFile, (LPSTR )&curFileRes, sizeof( CURFILERES)); @@ -579,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( _T("DISPLAY"), NULL, NULL, NULL); + hDC = CreateDC( wxT("DISPLAY"), NULL, NULL, NULL); // 5) Create a device dependent bitmap with the XOR bits. hbmXor = CreateBitmap( (int )lpDIB->bmiHeader.biWidth,