Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Context Menu during OnContextMenu()

Status
Not open for further replies.

nimaata

Programmer
Jan 3, 2005
27
US
ok i have a OnContextMenu(), works great when i want to display the context menu if the user right clicks anywhere on the interface, but it only works when the context menu is visible right below the title bar also

but i dont want that, i just want the context menu visible when a person clicks somewhere on the interface, is there a way to have the context menu right below the title bar always hidden b/c it takes up extra space, and just have the right click context menu visible whenever needed?
 
woops, forgot, here is my coding, that currently works only when the context menu is already loaded and visible underneath the title bar!

Code:
void CrenamefileDlg::OnContextMenu(CWnd *pWnd, CPoint point)
{
	CMenu *m,*mm;
	mm = CrenamefileDlg::GetMenu();
	m = mm->GetSubMenu(0);
	m->TrackPopupMenu(TPM_CENTERALIGN | TPM_LEFTBUTTON,point.x,point.y,this,0);
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top