17 wcex.cbSize =
sizeof(WNDCLASSEX);
18 wcex.style = CS_HREDRAW | CS_VREDRAW;
19 wcex.lpfnWndProc = wndproc;
24 wcex.hCursor = LoadCursor(NULL, IDC_ARROW);
25 wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
26 wcex.lpszMenuName = NULL;
27 wcex.lpszClassName =
"TutorialWindowClass";
28 wcex.hIconSm = LoadIcon(wcex.hInstance, (LPCTSTR)
IDI_TUTORIAL1);
29 if (!RegisterClassEx(&wcex))
33 RECT rc = { 0, 0, 1200, 950};
36 AdjustWindowRect(&rc, WS_OVERLAPPEDWINDOW, FALSE);
38 m_hWnd = CreateWindow(
"TutorialWindowClass",
51 MessageBox(
nullptr,
"CreateWindow failed!",
"Error", MB_OK);
52 ERROR(
"Window",
"init",
"CHECK FOR CreateWindow()");
56 ShowWindow(
m_hWnd, nCmdShow);
HRESULT init(HINSTANCE hInstance, int nCmdShow, WNDPROC wndproc, BaseApp *app)
Crea y muestra la ventana principal del motor.