Use SetClassLongPtr compatible for both Windows x86 and x64

This commit is contained in:
Prcuvu
2019-10-01 14:14:38 +08:00
parent e5321deed4
commit 4f864911fc
2 changed files with 3 additions and 4 deletions
+2 -2
View File
@@ -321,13 +321,13 @@ void GraphicsWindow::CreateGraphicsWindow( const VideoModeParams &p, bool bForce
// Update the window icon.
if( g_hIcon != nullptr )
{
SetClassLong( g_hWndMain, GCL_HICON, (LONG) LoadIcon(nullptr,IDI_APPLICATION) );
SetClassLongPtrA( g_hWndMain, GCLP_HICON, (LONG) LoadIcon(nullptr,IDI_APPLICATION) );
DestroyIcon( g_hIcon );
g_hIcon = nullptr;
}
g_hIcon = IconFromFile( p.sIconFile );
if( g_hIcon != nullptr )
SetClassLong( g_hWndMain, GCL_HICON, (LONG) g_hIcon );
SetClassLongPtrA( g_hWndMain, GCLP_HICON, (LONG) g_hIcon );
/* The window style may change as a result of switching to or from fullscreen;
* apply it. Don't change the WS_VISIBLE bit. */