mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-30 19:26:05 +00:00
context menus for start menus
svn path=/trunk/; revision=10364
This commit is contained in:
@@ -234,7 +234,7 @@ LRESULT QuickLaunchBar::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
|
||||
case WM_CONTEXTMENU: {
|
||||
TBBUTTON btn;
|
||||
QuickLaunchMap::iterator it;
|
||||
Point pt(lparam), clnt_pt=pt;
|
||||
Point screen_pt(lparam), clnt_pt=screen_pt;
|
||||
ScreenToClient(_hwnd, &clnt_pt);
|
||||
|
||||
Entry* entry = NULL;
|
||||
@@ -247,7 +247,7 @@ LRESULT QuickLaunchBar::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
|
||||
}
|
||||
|
||||
if (entry) // entry is NULL for desktop switch buttons
|
||||
CHECKERROR(entry->do_context_menu(_hwnd, pt));
|
||||
CHECKERROR(entry->do_context_menu(_hwnd, screen_pt));
|
||||
else
|
||||
goto def;
|
||||
break;}
|
||||
|
||||
@@ -428,6 +428,28 @@ LRESULT StartMenu::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
|
||||
SelectButtonIndex(0, wparam?true:false);
|
||||
break;
|
||||
|
||||
#ifdef _LIGHT_STARTMENU
|
||||
case WM_CONTEXTMENU: {
|
||||
Point screen_pt(lparam), clnt_pt=screen_pt;
|
||||
ScreenToClient(_hwnd, &clnt_pt);
|
||||
|
||||
int id = ButtonHitTest(clnt_pt);
|
||||
|
||||
if (id) {
|
||||
StartMenuEntry& sme = _entries[id];
|
||||
|
||||
for(ShellEntrySet::iterator it=sme._entries.begin(); it!=sme._entries.end(); ++it) {
|
||||
Entry* entry = *it;
|
||||
|
||||
if (entry) {
|
||||
CHECKERROR(entry->do_context_menu(_hwnd, screen_pt)); // may close start menu because of focus loss
|
||||
break; ///@todo handle context menu for more than one entry
|
||||
}
|
||||
}
|
||||
}
|
||||
break;}
|
||||
#endif
|
||||
|
||||
default: def:
|
||||
return super::WndProc(nmsg, wparam, lparam);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user