How to implement mouse drag using wxWidgets
I have an application without borders so I cannot move the application. This application has a wxPanel so the only way I can click and drag is thru the wxPanel. How to implement mouse drag? class myFrame : public wxFrame { public: myFrame(const wxString& title, wxWindow *parent=NULL); wxWindow* parent; private: wxDECLARE_EVENT_TABLE(); } class myPanel : public wxPanel { public: myPanel (wxWindow* parent) { this->parent = parent; dragging=false; x=0,y=0; Create(parent, wxID_ANY,wxDefaultPosition, *new wxSize(100,100)); } void onMouseDown(wxMouseEvent& evt) { CaptureMouse(); x = evt.GetX(); y = evt.GetY(); dragging=true; } void onMouseUp(wxMouseEvent& evt) { ReleaseMouse(); dragging=false; } void onMove(wxMouseEvent& evt) { if(dragging) { wxPoint mouseOnScreen = wxGe...