hi there, im using mfc
when i close my dialog box i want to disable mouse move events, so any idea how to do that?

i want to do that because i have problems, mouse move event happen before closing dialog box and i dont want that. have no idea why is this happening.

here is some code:
i call dialog box:

nRet = shpman.DoModal();  
    if ( nRet == IDOK || nRet == IDCANCEL  )
    {
      dialog_close = 5; 
    }

and here is mouse movement event:

void COpenGLWnd::OnMouseMove(UINT nFlags, CPoint point)
{
 
      if(!mLeftButtonDown && dialog_close !=5)
          OnMouseMoveTips(nFlags, point);
}

there is problem - I dont wanna call function OnMouseMoveTips(nFlags, point); when i close my Dialog box.
but for some reason the function is called when i close dialog if my mouse is on wnd,
if i close dialog outside my wnd everything is ok..

can u help me plesase??im gettin crazy:( tnx for any help

Edited 6 Years Ago by danijela123: n/a

how can i do that? cant find onclose() event handler... :(

i have only these events in my msg map

BEGIN_MESSAGE_MAP(CDialogNew, CDialog)
ON_BN_CLICKED(IDC_BUTTONLoad, &CDialogNew::OnBnClickedButtonload)
ON_BN_CLICKED(IDOK2, &CDialogNew::OnBnClickedOK)
ON_BN_CLICKED(IDC_BUTTONSave, &CDialogNew::OnBnClickedButtonsave)
END_MESSAGE_MAP()

Edited 6 Years Ago by danijela123: n/a

This article has been dead for over six months. Start a new discussion instead.