From bed3ea36ef5679d3b21ebb7fd57e3c1c085b1814 Mon Sep 17 00:00:00 2001 From: alex Date: Fri, 20 Jun 2008 05:28:10 +0000 Subject: [PATCH] Patch level : 10.0 80 Files correlati : xvaga Ricompilazione Demo : [ ] Commento : forse va !!!! git-svn-id: svn://10.65.10.50/trunk@16791 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- xvaga/xvaga.cpp | 15 +++------------ xvaga/xvtctl.cpp | 8 ++++++++ xvaga/xvtwin.cpp | 2 ++ 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/xvaga/xvaga.cpp b/xvaga/xvaga.cpp index f3b7e4a08..e633e1e1d 100755 --- a/xvaga/xvaga.cpp +++ b/xvaga/xvaga.cpp @@ -60,7 +60,6 @@ class TMessageBox : public wxDialog { protected: void OnButton(wxCommandEvent& evt); - void OnMouseCaptureLost(wxMouseCaptureLostEvent& evt); void AddButton(wxSizer* sz, int id, int ico); DECLARE_EVENT_TABLE() @@ -70,7 +69,6 @@ public: BEGIN_EVENT_TABLE(TMessageBox, wxDialog) EVT_BUTTON(wxID_ANY, TMessageBox::OnButton) - EVT_MOUSE_CAPTURE_LOST(TMessageBox::OnMouseCaptureLost) END_EVENT_TABLE() void TMessageBox::OnButton(wxCommandEvent& evt) @@ -86,13 +84,6 @@ void TMessageBox::OnButton(wxCommandEvent& evt) EndModal(ec); } -void TMessageBox::OnMouseCaptureLost(wxMouseCaptureLostEvent& e) -{ - e.Skip(); - - // Segnaposto inutile nella realta' ... ma indispensabile per qualche genio di wxWidgets -} - void TMessageBox::AddButton(wxSizer* sz, int id, int WXUNUSED(ico)) { sz->Add(new wxButton(this, id, wxEmptyString, wxDefaultPosition, @@ -158,9 +149,9 @@ int _MessageBox(const wxString& msg, int nStyle) { xvt_dm_post_speech(msg, 1, TRUE); - int ret = ::wxMessageBox(msg, _GetAppTitle(), nStyle); -/* TMessageBox dlg(msg, nStyle); - const int ret = dlg.ShowModal(); */ +//int ret = ::wxMessageBox(msg, _GetAppTitle(), nStyle); + TMessageBox dlg(msg, nStyle); + const int ret = dlg.ShowModal(); switch(ret) { diff --git a/xvaga/xvtctl.cpp b/xvaga/xvtctl.cpp index e51e957d5..368c85657 100755 --- a/xvaga/xvtctl.cpp +++ b/xvaga/xvtctl.cpp @@ -168,6 +168,7 @@ protected: public: int Add(short nIconId, const wxString strText, int nFlags); TwxOutlookBar(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style); + ~TwxOutlookBar(); }; WINDOW xvt_ctl_create_def(WIN_DEF *win_def_p, WINDOW parent_win, long app_data) @@ -1205,6 +1206,13 @@ TwxOutlookBar::TwxOutlookBar(wxWindow *parent, wxWindowID id, SetItemCount(0); } +TwxOutlookBar::~TwxOutlookBar() +{ + if (HasCapture()) + ReleaseMouse(); +} + + int xvt_list_add_item(WINDOW win, short icon, const char* text, int flags) { int n = -1; diff --git a/xvaga/xvtwin.cpp b/xvaga/xvtwin.cpp index 2c5688bd6..b391cbf5b 100755 --- a/xvaga/xvtwin.cpp +++ b/xvaga/xvtwin.cpp @@ -931,6 +931,8 @@ TwxWindow::TwxWindow(wxWindow *parent, wxWindowID id, const wxString& title, TwxWindow::~TwxWindow() { + if (HasCapture()) + ReleaseMouse(); EVENT e; memset(&e, 0, sizeof(EVENT)); e.type = E_DESTROY; DoXvtEvent(e);