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 by danijela123: n/a

6 Years
Discussion Span
Last Post by Ancient Dragon

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

i have only these events in my msg map

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

Edited by danijela123: n/a

This article has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.