|
From: Conrado P. <con...@us...> - 2006-12-09 22:06:17
|
Update of /cvsroot/smartwin/SmartWin/include/smartwin In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv10726/include/smartwin Modified Files: MessageMap.h Log Message: Added getCount, isSystemMenu to WidgetMenu Added getCount, onPopup, removeAllItems, isSystemMenu to WidgetMenuExtended Index: MessageMap.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/include/smartwin/MessageMap.h,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- MessageMap.h 10 Sep 2006 10:44:24 -0000 1.25 +++ MessageMap.h 9 Dec 2006 22:06:11 -0000 1.26 @@ -276,6 +276,7 @@ case WM_HSCROLL : case WM_VSCROLL : case WM_MEASUREITEM : + case WM_INITMENUPOPUP : { return mainWndRouteChild( hWnd, msg, wPar, lPar ); } @@ -292,7 +293,7 @@ virtual LRESULT mainWndRouteChild( HWND hWnd, UINT msg, WPARAM wPar, LPARAM lPar ) { // Checking to see if this is a message to a menu - if ( ( msg == WM_COMMAND && lPar == 0 && HIWORD( wPar ) == 0 ) || msg == WM_SYSCOMMAND ) + if ( ( msg == WM_COMMAND && lPar == 0 && HIWORD( wPar ) == 0 ) || msg == WM_SYSCOMMAND || msg == WM_INITMENUPOPUP ) { // We can have "user defined" sysmenu commands (by e.g. adding items to the sysmenu) but none will be // of higher or same value as SC_SIZE @@ -319,6 +320,12 @@ #endif ) { + if( msg == WM_INITMENUPOPUP && extPtr ) + { + HMENU handle = reinterpret_cast< HMENU >( extPtr->handle() ); + if( handle != (HMENU) wPar ) + continue; + } // function returns 1 of message was handled... // Need to iterate ALL menus until Event Handler is found... LRESULT retVal = ( * idx )->sendWidgetMessage( hWnd, msg, wPar, lPar ); |