mirror of
https://github.com/glfw/glfw.git
synced 2024-12-01 16:44:37 +00:00
Move to RegisterWindowClassEx for no real reason
This commit is contained in:
parent
1bf33a7402
commit
b4b210526a
@ -750,16 +750,15 @@ static void destroyWindow(_GLFWwindow* window)
|
|||||||
//
|
//
|
||||||
GLFWbool _glfwRegisterWindowClass(void)
|
GLFWbool _glfwRegisterWindowClass(void)
|
||||||
{
|
{
|
||||||
WNDCLASSW wc;
|
WNDCLASSEXW wc;
|
||||||
|
|
||||||
|
ZeroMemory(&wc, sizeof(wc));
|
||||||
|
wc.cbSize = sizeof(wc);
|
||||||
wc.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
|
wc.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
|
||||||
wc.lpfnWndProc = (WNDPROC) windowProc;
|
wc.lpfnWndProc = (WNDPROC) windowProc;
|
||||||
wc.cbClsExtra = 0; // No extra class data
|
|
||||||
wc.cbWndExtra = sizeof(void*) + sizeof(int); // Make room for one pointer
|
wc.cbWndExtra = sizeof(void*) + sizeof(int); // Make room for one pointer
|
||||||
wc.hInstance = GetModuleHandleW(NULL);
|
wc.hInstance = GetModuleHandleW(NULL);
|
||||||
wc.hCursor = LoadCursorW(NULL, IDC_ARROW);
|
wc.hCursor = LoadCursorW(NULL, IDC_ARROW);
|
||||||
wc.hbrBackground = NULL; // No background
|
|
||||||
wc.lpszMenuName = NULL; // No menu
|
|
||||||
wc.lpszClassName = _GLFW_WNDCLASSNAME;
|
wc.lpszClassName = _GLFW_WNDCLASSNAME;
|
||||||
|
|
||||||
// Load user-provided icon if available
|
// Load user-provided icon if available
|
||||||
@ -774,7 +773,7 @@ GLFWbool _glfwRegisterWindowClass(void)
|
|||||||
0, 0, LR_DEFAULTSIZE | LR_SHARED);
|
0, 0, LR_DEFAULTSIZE | LR_SHARED);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!RegisterClassW(&wc))
|
if (!RegisterClassExW(&wc))
|
||||||
{
|
{
|
||||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||||
"Win32: Failed to register window class");
|
"Win32: Failed to register window class");
|
||||||
|
Loading…
Reference in New Issue
Block a user