comparison src/video/wincommon/SDL_sysevents.c @ 149:0e66fd980014

Fixed compile errors and added call to SDL_SetModuleHandle() in WinMain()
author Sam Lantinga <slouken@libsdl.org>
date Thu, 09 Aug 2001 14:04:46 +0000
parents 29a638dc26db
children 0a26c92c2385
comparison
equal deleted inserted replaced
148:8758b8d42cd9 149:0e66fd980014
502 } 502 }
503 return(DefWindowProc(hwnd, msg, wParam, lParam)); 503 return(DefWindowProc(hwnd, msg, wParam, lParam));
504 } 504 }
505 505
506 /* Allow the application handle to be stored and retrieved later */ 506 /* Allow the application handle to be stored and retrieved later */
507 static HMODULE SDL_handle = NULL; 507 static void *SDL_handle = NULL;
508 508
509 void SDL_SetModuleHandle(HMODULE handle) 509 void SDL_SetModuleHandle(void *handle)
510 { 510 {
511 SDL_handle = handle; 511 SDL_handle = handle;
512 } 512 }
513 HMODULE SDL_GetModuleHandle(void) 513 void *SDL_GetModuleHandle(void)
514 { 514 {
515 void *handle; 515 void *handle;
516 516
517 if ( SDL_handle ) { 517 if ( SDL_handle ) {
518 handle = SDL_handle; 518 handle = SDL_handle;
529 529
530 /* This allows the SDL_WINDOWID hack */ 530 /* This allows the SDL_WINDOWID hack */
531 const char *SDL_windowid = NULL; 531 const char *SDL_windowid = NULL;
532 532
533 /* Register the class for this application -- exported for winmain.c */ 533 /* Register the class for this application -- exported for winmain.c */
534 int SDL_RegisterApp(char *name, Uint32 style, HMODULE hInst) 534 int SDL_RegisterApp(char *name, Uint32 style, void *hInst)
535 { 535 {
536 static int initialized = 0; 536 static int initialized = 0;
537 WNDCLASS class; 537 WNDCLASS class;
538 #ifdef WM_MOUSELEAVE 538 #ifdef WM_MOUSELEAVE
539 HMODULE handle; 539 HMODULE handle;
569 0, 0, LR_DEFAULTCOLOR); 569 0, 0, LR_DEFAULTCOLOR);
570 class.lpszMenuName = "(none)"; 570 class.lpszMenuName = "(none)";
571 class.lpszClassName = name; 571 class.lpszClassName = name;
572 #endif /* _WIN32_WCE */ 572 #endif /* _WIN32_WCE */
573 class.hbrBackground = NULL; 573 class.hbrBackground = NULL;
574 class.hInstance = hInst ? hInst : GetModuleHandle(0); 574 class.hInstance = hInst;
575 class.style = style; 575 class.style = style;
576 #ifdef HAVE_OPENGL 576 #ifdef HAVE_OPENGL
577 class.style |= CS_OWNDC; 577 class.style |= CS_OWNDC;
578 #endif 578 #endif
579 class.lpfnWndProc = WinMessage; 579 class.lpfnWndProc = WinMessage;