I'm having troubles showing my tray menu above the taskbar. It doesn't matter what I specify as y-position, it only gets against the taskbar at best. The tray menu is a resource.
This is the code I'm using for a rightclick on the systrayicon:
// The message loop
case WM_RBUTTONUP:
{
CPoint point;
::GetCursorPos(&point);
CMenu menu;
menu.LoadMenu(IDR_MENU1);
HMENU hMenu = menu.GetSubMenu(0)->Detach();
CMFCPopupMenu* pMenu = theApp.GetContextMenuManager()->ShowPopupMenu(hMenu, point.x-5, point.y, this, TRUE);
pMenu->SetForegroundWindow();
break;
}