]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed compile bug in dropsrc.cpp (constr. arg); GnuWin32 fix in registry.cpp;
authorJulian Smart <julian@anthemion.co.uk>
Thu, 13 Aug 1998 10:16:03 +0000 (10:16 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 13 Aug 1998 10:16:03 +0000 (10:16 +0000)
combobox event fix; moved SetAcceleratorTable down to window.h/cpp

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@524 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/combobox.cpp
src/msw/frame.cpp
src/msw/ole/dropsrc.cpp
src/msw/registry.cpp
src/msw/tbar95.cpp
src/msw/window.cpp

index 146d1bd5a70113a9c3fdd867c30ed9448004ef45..1b795f43e63d339419ba78a62264a0b0b2a326aa 100644 (file)
@@ -50,6 +50,7 @@ bool wxComboBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
   {
     wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, m_windowId);
     event.SetString(copystring(GetValue()));
+    event.SetEventObject(this);
     ProcessCommand(event);
     delete[] event.GetString();
     return TRUE;
index 1a7f2bb7a600992e21f6c77dac20fe1c2d6c17c7..7beb0561a424ab66f02d0e2f3673d42c40029e37 100644 (file)
@@ -352,11 +352,6 @@ void wxFrame::SetIcon(const wxIcon& icon)
 #endif
 }
 
-void wxFrame::SetAcceleratorTable(const wxAcceleratorTable& accel)
-{
-    m_acceleratorTable = accel;
-}
-
 wxStatusBar *wxFrame::OnCreateStatusBar(int number, long style, wxWindowID id,
     const wxString& name)
 {
index 83d00f3aeb4c1959cbc415657149d711cf6f0ade..1f9708873201e968a9256aaf4c2ec9b0af68976a 100644 (file)
@@ -149,13 +149,13 @@ void wxDropSource::Init()
   m_pIDropSource->AddRef();
 }
 
-wxDropSource::wxDropSource()
+wxDropSource::wxDropSource(wxWindow* WXUNUSED(win))
 {
   Init();
   m_pData = NULL;
 }
 
-wxDropSource::wxDropSource(wxDataObject& data)
+wxDropSource::wxDropSource(wxDataObject& data, wxWindow* WXUNUSED(win))
 {
   Init();
   SetData(data);
index 4717b97ebbc9b92d49fc73507f07c8738486910c..1fcc78c55f926aa263b3b8a403cfd0164cf72e73 100644 (file)
@@ -297,10 +297,17 @@ wxString wxRegKey::GetName(bool bShortPrefix) const
   return str;
 }
 
+#ifdef __GNUWIN32__
+bool wxRegKey::GetKeyInfo(uint* pnSubKeys,
+                          uint* pnMaxKeyLen,
+                          uint* pnValues,
+                          uint* pnMaxValueLen) const
+#else
 bool wxRegKey::GetKeyInfo(ulong *pnSubKeys,
                           ulong *pnMaxKeyLen,
                           ulong *pnValues,
                           ulong *pnMaxValueLen) const
+#endif
 {
 #ifdef  __WIN32__
   m_dwLastError = ::RegQueryInfoKey
index f3a96868f7e162548effe8247796f550b6ea6fda..12b4f41ba8a7095a39661dba6e6ac65a40f70f83 100644 (file)
@@ -432,6 +432,11 @@ void wxToolBar95::ToggleTool(int toolIndex, bool toggle)
   }
 }
 
+bool wxToolBar95::GetToolState(int toolIndex) const
+{
+    return (::SendMessage((HWND) GetHWND(), TB_ISBUTTONCHECKED, (WPARAM)toolIndex, (LPARAM)0) != 0);
+}
+
 void wxToolBar95::ClearTools(void)
 {
   // TODO: Don't know how to reset the toolbar bitmap, as yet.
index 3c61e27b286f9ae59eb8251f60861a684b598e65..5abe05b464753c04816f489c990cdf71cdbaa9ca 100644 (file)
@@ -504,6 +504,12 @@ void wxWindow::ReleaseMouse(void)
   }
 }
 
+void wxWindow::SetAcceleratorTable(const wxAcceleratorTable& accel)
+{
+    m_acceleratorTable = accel;
+}
+
+
 // Push/pop event handler (i.e. allow a chain of event handlers
 // be searched)
 void wxWindow::PushEventHandler(wxEvtHandler *handler)
@@ -1961,9 +1967,13 @@ bool wxWindow::MSWProcessMessage(WXMSG* pMsg)
   return FALSE;
 }
 
-bool wxWindow::MSWTranslateMessage(WXMSG* WXUNUSED(pMsg))
+bool wxWindow::MSWTranslateMessage(WXMSG* pMsg)
 {
-    return FALSE;
+    if (m_acceleratorTable.Ok() &&
+          ::TranslateAccelerator((HWND) GetHWND(), (HACCEL) m_acceleratorTable.GetHACCEL(), (MSG *)pMsg))
+        return TRUE;
+    else
+        return FALSE;
 }
 
 long wxWindow::MSWOnMDIActivate(long WXUNUSED(flag), WXHWND WXUNUSED(activate), WXHWND WXUNUSED(deactivate))