From: <kr_...@us...> - 2003-03-31 00:12:10
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32 In directory sc8-pr-cvs1:/tmp/cvs-serv21987/port/src/cbits/Win32 Modified Files: Window.c Log Message: implementation for contextMenu event Index: Window.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Window.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** Window.c 30 Mar 2003 23:13:19 -0000 1.21 --- Window.c 31 Mar 2003 00:12:07 -0000 1.22 *************** *** 627,630 **** --- 627,641 ---- } break; + case WM_CONTEXTMENU: + if (pData->enabled) + { + POINT pos; + + pos.x = pData->Origin.x+GET_X_LPARAM(lParam); + pos.y = pData->Origin.y+GET_Y_LPARAM(lParam); + + handleWindowContextMenu(hWnd,pos.x,pos.y,GetModifiers()); + } + break; case WM_SYSKEYDOWN: case WM_KEYDOWN: *************** *** 746,749 **** --- 757,761 ---- case WM_LBUTTONDOWN: SetActiveWindow(hWnd); + SetFocus(hWnd); break; case WM_DESTROY: *************** *** 751,754 **** --- 763,768 ---- SetWindowText(ghWndFrame, pFrameData->lpszAppName ? pFrameData->lpszAppName : ""); break; + case WM_GETDLGCODE: + return DLGC_WANTMESSAGE; } *************** *** 806,809 **** --- 820,826 ---- { case 1: // SDI + if (pFrameData->hClientWnd) // There is already created window and SDI does't allow + return NULL; //more that one window at the same time. + GetClientRect(ghWndFrame, &rect); hWnd = CreateWindow( |