From: Julian Smart Date: Fri, 25 Feb 2000 16:20:58 +0000 (+0000) Subject: Fixed wxWindow::HandleCommand so multiple toolbars work again (e.g. ogl/studio sample); X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/2f4ef631afd081336dcf894b7fd6b58c5949fd71 Fixed wxWindow::HandleCommand so multiple toolbars work again (e.g. ogl/studio sample); added border to OGL studio window git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6287 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 0be7635f72..163a72e055 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -3020,13 +3020,14 @@ bool wxWindow::HandleCommand(WXWORD id, WXWORD cmd, WXHWND control) return popupMenu->MSWCommand(cmd, id); } - wxWindow *win; + wxWindow *win = (wxWindow*) NULL; if ( cmd == 0 || cmd == 1 ) // menu or accel - use id { // must cast to a signed type before comparing with other ids! win = FindItem((signed short)id); } - else + + if (!win && control) { // find it from HWND - this works even with the broken programs using // the same ids for different controls diff --git a/utils/ogl/samples/studio/studio.cpp b/utils/ogl/samples/studio/studio.cpp index 01572c1e38..d8ca7a8890 100644 --- a/utils/ogl/samples/studio/studio.cpp +++ b/utils/ogl/samples/studio/studio.cpp @@ -285,7 +285,7 @@ csCanvas *csApp::CreateCanvas(wxView *view, wxFrame *parent) parent->GetClientSize(&width, &height); // Non-retained canvas - csCanvas *canvas = new csCanvas((csDiagramView*) view, parent, 1000, wxPoint(0, 0), wxSize(width, height), 0); + csCanvas *canvas = new csCanvas((csDiagramView*) view, parent, 1000, wxPoint(0, 0), wxSize(width, height), wxSUNKEN_BORDER); wxColour bgColour("WHITE"); canvas->SetBackgroundColour(bgColour); diff --git a/utils/wxMMedia2/lib/makefile.vc b/utils/wxMMedia2/lib/makefile.vc index 458d3d076b..8930197358 100644 --- a/utils/wxMMedia2/lib/makefile.vc +++ b/utils/wxMMedia2/lib/makefile.vc @@ -15,7 +15,7 @@ WXDIR = $(WXWIN) MMDIR = $(WXDIR)\utils\wxMMedia2 THISDIR = $(MMDIR)\lib -EXTRALIBS=$(WXDIR)\lib\glcanvas.lib +EXTRALIBS=$(WXDIR)\lib\mmedia2.lib LIBTARGET=$(WXDIR)\lib\mmedia2.lib OBJECTS = cdbase.obj cdwin.obj g711.obj g721.obj g723_24.obj sndg72x.obj \