Use NULL as instance when loading predefined icon/cursor

This commit is contained in:
Scott Graham 2014-04-16 21:03:36 -07:00
parent bc36c29f2a
commit 69ad8504b0

View file

@ -160,11 +160,11 @@ namespace entry
wnd.cbSize = sizeof(wnd);
wnd.lpfnWndProc = DefWindowProc;
wnd.hInstance = instance;
wnd.hIcon = LoadIcon(instance, IDI_APPLICATION);
wnd.hCursor = LoadCursor(instance, IDC_ARROW);
wnd.hIcon = LoadIcon(NULL, IDI_APPLICATION);
wnd.hCursor = LoadCursor(NULL, IDC_ARROW);
wnd.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
wnd.lpszClassName = "bgfx_letterbox";
wnd.hIconSm = LoadIcon(instance, IDI_APPLICATION);
wnd.hIconSm = LoadIcon(NULL, IDI_APPLICATION);
RegisterClassExA(&wnd);
memset(&wnd, 0, sizeof(wnd) );
@ -172,10 +172,10 @@ namespace entry
wnd.style = CS_HREDRAW | CS_VREDRAW;
wnd.lpfnWndProc = wndProc;
wnd.hInstance = instance;
wnd.hIcon = LoadIcon(instance, IDI_APPLICATION);
wnd.hCursor = LoadCursor(instance, IDC_ARROW);
wnd.hIcon = LoadIcon(NULL, IDI_APPLICATION);
wnd.hCursor = LoadCursor(NULL, IDC_ARROW);
wnd.lpszClassName = "bgfx";
wnd.hIconSm = LoadIcon(instance, IDI_APPLICATION);
wnd.hIconSm = LoadIcon(NULL, IDI_APPLICATION);
RegisterClassExA(&wnd);
HWND hwnd = CreateWindowA("bgfx_letterbox"