src/video/windx5/SDL_dx5events.c
changeset 1303 52b5afd7ecee
parent 1288 ea3888b472bf
child 1312 c9b51268668f
equal deleted inserted replaced
1302:94643e9bad18 1303:52b5afd7ecee
    64 static SDLKey DIK_keymap[256];
    64 static SDLKey DIK_keymap[256];
    65 static SDL_keysym *TranslateKey(UINT scancode, SDL_keysym *keysym, int pressed);
    65 static SDL_keysym *TranslateKey(UINT scancode, SDL_keysym *keysym, int pressed);
    66 
    66 
    67 /* DJM: If the user setup the window for us, we want to save his window proc,
    67 /* DJM: If the user setup the window for us, we want to save his window proc,
    68    and give him a chance to handle some messages. */
    68    and give him a chance to handle some messages. */
    69 static WNDPROC userWindowProc = NULL;
    69 #ifdef STRICT
       
    70 #define WNDPROCTYPE	WNDPROC
       
    71 #else
       
    72 #define WNDPROCTYPE	FARPROC
       
    73 #endif
       
    74 static WNDPROCTYPE userWindowProc = NULL;
    70 
    75 
    71 static HWND GetTopLevelParent(HWND hWnd)
    76 static HWND GetTopLevelParent(HWND hWnd)
    72 {
    77 {
    73     HWND hParentWnd;
    78     HWND hParentWnd;
    74     while (1)
    79     while (1)
   869 		}
   874 		}
   870 
   875 
   871 		/* DJM: we want all event's for the user specified
   876 		/* DJM: we want all event's for the user specified
   872 			window to be handled by SDL.
   877 			window to be handled by SDL.
   873 		 */
   878 		 */
   874 		userWindowProc = (WNDPROC)GetWindowLong(SDL_Window, GWL_WNDPROC);
   879 		userWindowProc = (WNDPROCTYPE)GetWindowLong(SDL_Window, GWL_WNDPROC);
   875 		SetWindowLong(SDL_Window, GWL_WNDPROC, (LONG)WinMessage);
   880 		SetWindowLong(SDL_Window, GWL_WNDPROC, (LONG)WinMessage);
   876 	} else {
   881 	} else {
   877 		SDL_Window = CreateWindow(SDL_Appname, SDL_Appname,
   882 		SDL_Window = CreateWindow(SDL_Appname, SDL_Appname,
   878                         (WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX),
   883                         (WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX),
   879                         CW_USEDEFAULT, CW_USEDEFAULT, 0, 0, NULL, NULL, SDL_Instance, NULL);
   884                         CW_USEDEFAULT, CW_USEDEFAULT, 0, 0, NULL, NULL, SDL_Instance, NULL);