PLRoss
asked on
Detect Rt Mouse in Dialog
I am trying to detect a right mouse button cllick in an edit control within a dialog.
I have coded :
BEGIN_MESSAGE_MAP
On_WM_RBUTTONDOWN()
...
END_MESSAGE_MAP
-- in dialog class definition --
Protected:
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
...
-- in dialog class coding --
void CSect2::OnRButtonDown(UINT nFlags, CPoint point)
{
CWnd* pCurWnd;
pCurWnd = WindowFromPoint(point);
if (pCurWnd == GetDlgItem(IDC_ITEM))
{
......
}
In debug mode, I get a break if mouse cllick is in dialog window outside of the edit control, but no break if mouse click is in edit control.
How do I detect a right mouse click in the edit control ?
Any help is appreciated. Thanks.
I have coded :
BEGIN_MESSAGE_MAP
On_WM_RBUTTONDOWN()
...
END_MESSAGE_MAP
-- in dialog class definition --
Protected:
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
...
-- in dialog class coding --
void CSect2::OnRButtonDown(UINT
{
CWnd* pCurWnd;
pCurWnd = WindowFromPoint(point);
if (pCurWnd == GetDlgItem(IDC_ITEM))
{
......
}
In debug mode, I get a break if mouse cllick is in dialog window outside of the edit control, but no break if mouse click is in edit control.
How do I detect a right mouse click in the edit control ?
Any help is appreciated. Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.