FillChar(WindowClass, SizeOf(WindowClass), 0);
WindowClass.Style := CS_HREDRAW or CS_VREDRAW;
WindowClass.lpfnWndProc := @DefWindowProc;
WindowClass.cbClsExtra := 0;
WindowClass.cbWndExtra := 0;
WindowClass.hInstance := hInstance;
WindowClass.hCursor := LoadCursorW(0, PChar(IDC_ARROW));
WindowClass.hbrBackground := GetStockObject(NULL_BRUSH);
WindowClass.lpszMenuName := nil;
WindowClass.lpszClassName := PChar('OpenGLWindow');
if
Winapi.Windows.RegisterClass(WindowClass) = 0 then
RaiseLastOSError;
end;
FWnd := CreateWindowEx(0, WindowClass.lpszClassName, nil, WS_CHILDWINDOW, 0,
0, 0, 0, GetDesktopWindow, 0, hInstance, nil);
ShowWindow(FWnd, SW_HIDE);