@@ -382,23 +382,26 @@ LRESULT CALLBACK window_procedure(
382382}
383383} // namespace
384384
385- display_wrapper::window_class_wrapper::window_class_wrapper (const char * window_class_name, WNDPROC window_procedure) :
385+ display_wrapper::window_class_wrapper::window_class_wrapper (
386+ const char * window_class_name, //
387+ WNDPROC window_procedure
388+ ) :
386389 window_class_name(window_class_name)
387390{
388- WNDCLASS wc;
391+ WNDCLASSA wc;
389392
390393 wc.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC; // redraw on resize, own DC for window
391- wc.lpfnWndProc = window_procedure;
394+ wc.lpfnWndProc = & window_procedure;
392395 wc.cbClsExtra = 0 ; // no extra window data
393396 wc.cbWndExtra = 0 ; // no extra window data
394397 wc.hInstance = GetModuleHandle (nullptr ); // instance handle
395398 wc.hIcon = LoadIcon (nullptr , IDI_WINLOGO);
396399 wc.hCursor = LoadCursor (nullptr , IDC_ARROW);
397- wc.hbrBackground = nullptr ; // no background required for OpenGL
400+ wc.hbrBackground = nullptr ; // no background needed for OpenGL
398401 wc.lpszMenuName = nullptr ; // we don't want a menu
399402 wc.lpszClassName = this ->window_class_name ; // set the window class name
400403
401- auto res = RegisterClass (&wc);
404+ auto res = RegisterClassA (&wc);
402405
403406 if (res == 0 ) {
404407 // TODO: add error information to the exception message using GetLastError() and FormatMessage()
@@ -408,7 +411,7 @@ display_wrapper::window_class_wrapper::window_class_wrapper(const char* window_c
408411
409412display_wrapper::window_class_wrapper::~window_class_wrapper ()
410413{
411- auto res = UnregisterClass (
414+ auto res = UnregisterClassA (
412415 this ->window_class_name , //
413416 GetModuleHandle (nullptr )
414417 );
0 commit comments