wxWindows destruction and ReleaseMouse(); on wxMSW

olivier.corrio at gmail.com olivier.corrio at gmail.com
Mon Feb 5 00:21:42 PST 2007


Hi,
just Close() the frame. Here is my code :

void SimpleFrame::OnMove(wxMoveEvent& event)
{
...
  if (...) Close(true);
}

void SimpleFrame::OnClose(wxCloseEvent& event)
{
  ...
  if (HasCapture()) ReleaseMouse(); // for MSW
  event.Skip();
}

Thanks for answer
Sincerely Olivier
On 3 fév, 00:19, v... at wxwindows.org (Vadim Zeitlin) wrote:
> On 2 Feb 2007 01:02:39 -0800 olivier.cor... at gmail.com wrote:
>
> > i did a application on wxGTK (on linux) and i m not testing it on
> > wxMSW. I have a frame and i move that frame. When the frame it at good
> > place i close it (the panel is reparent to another frame). But the
> > frame close but i didn't release the left button on mouse.
> > If i then move the mouse the application crashes. To avoid that i put
> > a   ReleaseMouse(); in the close event handler.
> > I think that it should be done automaticaly. On wxGTK it works fine.
>
>  Do you really just Close() the frame or do you delete it?
> VZ
>
> --
> TT-Solutions: wxWidgets consultancy and technical support
>                http://www.tt-solutions.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-users-unsubscr... at lists.wxwidgets.org
> For additional commands, e-mail: wx-users-h... at lists.wxwidgets.org








More information about the wx-users mailing list