LRESULT APIENTRY WndProc(HWND, UINT, WPARAM, LPARAM);
BOOL CreateProc(HWND);
VOID DestroyProc(HWND);
-BOOL CommandProc(HWND, WPARAM, LPARAM);
+LRESULT APIENTRY CmdProc(HWND, UINT, WPARAM, LPARAM);
#endif
break;
case WM_COMMAND :
- CommandProc(hWndFrame, wParam, lParam);
+ CmdProc(hWndFrame, LOWORD(wParam), wParam, lParam);
break;
case WM_DESTROY :
/*--------------------------------------------------------------------------*\
| COMMAND PROCEDURE
| Handler for message WM_COMMAND
-|
+| It is used when Draw_IsConsoleSubsystem = Standard_False
+| i.e. in non-console mode (see _main_() in Draw_Main.cxx).
\*--------------------------------------------------------------------------*/
-BOOL CommandProc(HWND hWndFrame, WPARAM wParam, LPARAM /*lParam*/)
+LRESULT APIENTRY CmdProc(HWND hWndFrame, UINT wMsg, WPARAM /*wParam*/, LPARAM /*lParam*/)
{
// Handle on window MDI
HWND hWndClient = (HWND)GetWindowLongPtr (hWndFrame, CLIENTWND);
- switch (LOWORD(wParam))
+ switch (wMsg)
{
case IDM_WINDOW_NEXT :
if(hWndClient)
DestroyProc(hWndFrame);
break;
- }
- return(TRUE);
+ }
+ return(0l);
}
// Enregistrement de la fenetre CommandWindow
//------
- wndClass.lpfnWndProc = (WNDPROC)CommandProc((HWND)WndProc,(WPARAM)342,(LPARAM)443);
- //wndClass.lpfnWndProc = (WNDPROC)CommandProc;
+ wndClass.lpfnWndProc = (WNDPROC)CmdProc;
wndClass.hIcon = 0;
wndClass.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
wndClass.lpszMenuName = NULL;