5 LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
17 return DefWindowProc(hWnd, message, wParam, lParam);
20 static const PTCHAR GetTestWindowName()
22 return TEXT("ANGLE_TEST");
25 bool ANGLETest::InitTestWindow()
29 sWC.lpfnWndProc = WndProc;
34 sWC.hCursor = LoadCursor(NULL, IDC_ARROW);
35 sWC.lpszMenuName = NULL;
36 sWC.hbrBackground = NULL;
37 sWC.lpszClassName = GetTestWindowName();
39 if (!RegisterClass(&sWC))
44 mNativeWindow = CreateWindow(GetTestWindowName(), NULL, WS_BORDER, 128, 128, 128, 128, NULL, NULL, NULL, NULL);
46 SetWindowLong(mNativeWindow, GWL_STYLE, 0);
47 ShowWindow(mNativeWindow, SW_SHOW);
49 mNativeDisplay = GetDC(mNativeWindow);
59 bool ANGLETest::DestroyTestWindow()
63 ReleaseDC(mNativeWindow, mNativeDisplay);
69 DestroyWindow(mNativeWindow);
73 UnregisterClass(GetTestWindowName(), NULL);
78 bool ANGLETest::ReizeWindow(int width, int height)
81 if (!GetWindowRect(mNativeWindow, &windowRect))
86 if (!MoveWindow(mNativeWindow, windowRect.left, windowRect.top, width, height, FALSE))