]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/control.cpp
Dialog Editor corrections for latest wxWin changes; removed wxProp files
[wxWidgets.git] / src / msw / control.cpp
index 22090f64c04280d15d1ba3c66b248b5d668eee09..297d81e8fbf7cd02f57744fa5e39688186cd8147 100644 (file)
@@ -74,9 +74,12 @@ void wxControl::SetLabel(const wxString& label)
 
 wxString wxControl::GetLabel(void) const
 {
 
 wxString wxControl::GetLabel(void) const
 {
-  wxBuffer[0] = 0;
-  if (GetHWND())
-    GetWindowText((HWND)GetHWND(), wxBuffer, 1000);
+    wxBuffer[0] = 0;
+    if (GetHWND())
+    {
+        int len = GetWindowText((HWND)GetHWND(), wxBuffer, 256);
+        wxBuffer[len] = 0;
+    }
 
   return wxString(wxBuffer);
 }
 
   return wxString(wxBuffer);
 }
@@ -182,7 +185,8 @@ long wxControl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
   return wxWindow::MSWWindowProc(nMsg, wParam, lParam);
 }
 
   return wxWindow::MSWWindowProc(nMsg, wParam, lParam);
 }
 
-bool wxControl::MSWNotify(WXWPARAM wParam, WXLPARAM lParam)
+bool wxControl::MSWNotify(WXWPARAM wParam, WXLPARAM lParam,
+                          WXLPARAM* WXUNUSED(result))
 {
 #if defined(__WIN95__)
        wxCommandEvent event(wxEVT_NULL, m_windowId);
 {
 #if defined(__WIN95__)
        wxCommandEvent event(wxEVT_NULL, m_windowId);
@@ -232,18 +236,18 @@ bool wxControl::MSWNotify(WXWPARAM wParam, WXLPARAM lParam)
                        break;
                }
 */
                        break;
                }
 */
-               default :
+               default:
                        return FALSE;
                        return FALSE;
-                       break;
        }
        }
+
     event.SetEventType(eventType);
        event.SetEventObject(this);
 
     event.SetEventType(eventType);
        event.SetEventObject(this);
 
-       if ( !ProcessEvent(event) )
+       if ( !GetEventHandler()->ProcessEvent(event) )
                return FALSE;
        return TRUE;
                return FALSE;
        return TRUE;
-#else
-  return FALSE;
+#else   // !Win95
+    return FALSE;
 #endif
 }
 
 #endif
 }