From: <kr_...@us...> - 2003-06-08 08:17:58
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32 In directory sc8-pr-cvs1:/tmp/cvs-serv7969/src/cbits/Win32 Modified Files: Menu.c Window.c Log Message: bugfixes Index: Menu.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Menu.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Menu.c 26 Apr 2003 20:01:33 -0000 1.7 --- Menu.c 8 Jun 2003 08:17:52 -0000 1.8 *************** *** 96,104 **** RECT rc; FrameData *pFrameData = (FrameData *) GetWindowLong(ghWndFrame,GWL_USERDATA); ! GetClientRect(ghWndFrame, &rc); SetWindowPos(pFrameData->hClientWnd,NULL,rc.left,rc.top,rc.right,rc.bottom,SWP_NOZORDER); DrawMenuBar(ghWndFrame); ! if (pFrameData->DocumentInterface == 1) { --- 96,104 ---- RECT rc; FrameData *pFrameData = (FrameData *) GetWindowLong(ghWndFrame,GWL_USERDATA); ! GetClientRect(ghWndFrame, &rc); SetWindowPos(pFrameData->hClientWnd,NULL,rc.left,rc.top,rc.right,rc.bottom,SWP_NOZORDER); DrawMenuBar(ghWndFrame); ! if (pFrameData->DocumentInterface == 1) { *************** *** 239,242 **** --- 239,243 ---- deleteMenuHandle(pFrameData->pMenuHandlesMap, handle); + updateMenuBar(handle->parent); } *************** *** 256,264 **** FrameData *pFrameData; ! CHECK_MENU_TYPE_V(handle, MENU_RADIO_ITEM | MENU_CHECK_ITEM | MENU_ITEM); pFrameData = (FrameData *) GetWindowLong(ghWndFrame,GWL_USERDATA); EnableMenuItem(getParentHMENU(handle), getMenuPos(pFrameData->pMenuHandlesMap, handle), (bState ? MF_ENABLED : MF_GRAYED) | MF_BYPOSITION); }; --- 257,266 ---- FrameData *pFrameData; ! CHECK_MENU_TYPE_V(handle, MENU_RADIO_ITEM | MENU_CHECK_ITEM | MENU_ITEM | MENU_POPUP); pFrameData = (FrameData *) GetWindowLong(ghWndFrame,GWL_USERDATA); EnableMenuItem(getParentHMENU(handle), getMenuPos(pFrameData->pMenuHandlesMap, handle), (bState ? MF_ENABLED : MF_GRAYED) | MF_BYPOSITION); + updateMenuBar(handle->parent); }; *************** *** 268,272 **** FrameData *pFrameData; ! CHECK_MENU_TYPE(handle, MENU_RADIO_ITEM | MENU_CHECK_ITEM | MENU_ITEM, FALSE); pFrameData = (FrameData *) GetWindowLong(ghWndFrame,GWL_USERDATA); --- 270,274 ---- FrameData *pFrameData; ! CHECK_MENU_TYPE(handle, MENU_RADIO_ITEM | MENU_CHECK_ITEM | MENU_ITEM | MENU_POPUP, FALSE); pFrameData = (FrameData *) GetWindowLong(ghWndFrame,GWL_USERDATA); *************** *** 287,290 **** --- 289,293 ---- CheckMenuItem(getParentHMENU(handle), getMenuPos(pFrameData->pMenuHandlesMap, handle), (bState ? MF_CHECKED : MF_UNCHECKED) | MF_BYPOSITION); + updateMenuBar(handle->parent); handleMenuCommand(handle); *************** *** 323,326 **** --- 326,330 ---- CheckMenuRadioItem(hParent, pos, pos+getChildrenCount(pFrameData->pMenuHandlesMap, handle)-1, pos+index, MF_BYPOSITION); + updateMenuBar(handle->parent); handleMenuCommand(child); Index: Window.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Window.c,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** Window.c 1 May 2003 20:35:28 -0000 1.29 --- Window.c 8 Jun 2003 08:17:52 -0000 1.30 *************** *** 166,169 **** --- 166,171 ---- pData->hTooltip = NULL; SetWindowLong(hWnd,GWL_USERDATA,(LONG) pData); + + SetFocus(hWnd); } break; *************** *** 789,793 **** switch (uMsg) { ! case WM_CLOSE: { HWND hOwner = GetWindow(hWnd, GW_OWNER); --- 791,795 ---- switch (uMsg) { ! case WM_DESTROY: { HWND hOwner = GetWindow(hWnd, GW_OWNER); |