X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d26e1ab2061fa549653c7b7e5f3ae04f7fa2e003..85f138db83939ce7c59a942aaecca7fa98168db3:/src/msw/window.cpp diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 119a50c4a8..3e634d1574 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -264,7 +264,7 @@ wxBEGIN_FLAGS( wxWindowStyle ) wxFLAGS_MEMBER(wxBORDER_RAISED) wxFLAGS_MEMBER(wxBORDER_STATIC) wxFLAGS_MEMBER(wxBORDER_NONE) - + // old style border flags wxFLAGS_MEMBER(wxSIMPLE_BORDER) wxFLAGS_MEMBER(wxSUNKEN_BORDER) @@ -339,7 +339,9 @@ wxCONSTRUCTOR_DUMMY(wxWindow) BEGIN_EVENT_TABLE(wxWindowMSW, wxWindowBase) EVT_ERASE_BACKGROUND(wxWindowMSW::OnEraseBackground) EVT_SYS_COLOUR_CHANGED(wxWindowMSW::OnSysColourChanged) +#ifdef __WXWINCE__ EVT_INIT_DIALOG(wxWindowMSW::OnInitDialog) +#endif END_EVENT_TABLE() // =========================================================================== @@ -1381,6 +1383,8 @@ void wxWindowMSW::DragAcceptFiles(bool accept) HWND hWnd = GetHwnd(); if ( hWnd ) ::DragAcceptFiles(hWnd, (BOOL)accept); +#else + wxUnusedVar(accept); #endif } @@ -2394,18 +2398,18 @@ WXLRESULT wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM l case WM_MOUSELEAVE: { wxASSERT_MSG( !m_mouseInWindow, wxT("the mouse should be in a window to generate this event!") ); - + // only process this message if the mouse is not in the window, - // This can also check for children in composite windows. + // This can also check for children in composite windows. // however, this may mean the the wxEVT_LEAVE_WINDOW is never sent - // if the mouse does not enter the window from it's child before + // if the mouse does not enter the window from it's child before // leaving the scope of the window. ( perhaps this can be picked // up in the OnIdle code as before, for this special case ) if ( /*IsComposite() && */ !IsMouseInWindow() ) { m_mouseInWindow = false; - // Unfortunately no mouse state is passed with a WM_MOUSE_LEAVE + // Unfortunately no mouse state is passed with a WM_MOUSE_LEAVE int state = 0; if ( wxIsShiftDown() ) state |= MK_SHIFT; @@ -2444,7 +2448,7 @@ WXLRESULT wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM l break; #endif // __WXWINCE__ - + #if wxUSE_MOUSEWHEEL case WM_MOUSEWHEEL: processed = HandleMouseWheel(wParam, lParam); @@ -3045,7 +3049,7 @@ bool wxWindowMSW::MSWGetCreateWindowCoords(const wxPoint& pos, already has - so no WM_SIZE would be sent. */ - + // we don't use CW_USEDEFAULT here for several reasons: // // 1. it results in huge frames on modern screens (1000*800 is not @@ -3436,7 +3440,7 @@ bool wxWindowMSW::HandleSetFocus(WXHWND hwnd) { return false; } - + // notify the parent keeping track of focus for the kbd navigation // purposes that we got it wxChildFocusEvent eventFocus((wxWindow *)this); @@ -3527,6 +3531,7 @@ bool wxWindowMSW::HandleInitDialog(WXHWND WXUNUSED(hWndFocus)) bool wxWindowMSW::HandleDropFiles(WXWPARAM wParam) { #if defined (__WXMICROWIN__) || defined(__WXWINCE__) + wxUnusedVar(wParam); return false; #else // __WXMICROWIN__ HDROP hFilesInfo = (HDROP) wParam; @@ -3701,7 +3706,7 @@ wxWindowMSW::MSWOnDrawItem(int WXUNUSED_UNLESS_ODRAWN(id), #else // !wxUSE_OWNER_DRAWN // we may still have owner-drawn buttons internally because we have to make // them owner-drawn to support colour change - wxControl *item = + wxControl *item = # if wxUSE_BUTTON wxDynamicCast(FindItem(id), wxButton) # else @@ -4099,7 +4104,7 @@ void wxWindowMSW::OnEraseBackground(wxEraseEvent& event) { RECT rect; ::GetClientRect(GetHwnd(), &rect); - + wxColour backgroundColour( GetBackgroundColour()); COLORREF ref = PALETTERGB(backgroundColour.Red(), backgroundColour.Green(), @@ -4443,7 +4448,7 @@ bool wxWindowMSW::HandleMouseMove(int x, int y, WXUINT flags) trackinfo.hwndTrack = GetHwnd(); //Use the commctrl.h _TrackMouseEvent, which will call the // appropriate TrackMouseEvent or emulate it ( win95 ) - // else we need _WIN32_WINNT >= 0x0400 + // else we need _WIN32_WINNT >= 0x0400 _TrackMouseEvent(&trackinfo); #endif #endif @@ -4819,7 +4824,7 @@ bool wxWindowMSW::HandleJoystickEvent(WXUINT msg, int x, int y, WXUINT flags) bool wxWindowMSW::MSWOnScroll(int orientation, WXWORD wParam, WXWORD pos, WXHWND control) -{ +{ if ( control && control != m_hWnd ) // Prevent infinite recursion { wxWindow *child = wxFindWinFromHandle(control); @@ -4902,13 +4907,13 @@ void wxGetCharSize(WXHWND wnd, int *x, int *y, const wxFont& the_font) TEXTMETRIC tm; HDC dc = ::GetDC((HWND) wnd); HFONT was = 0; - + // the_font.UseResource(); // the_font.RealizeResource(); HFONT fnt = (HFONT)the_font.GetResourceHandle(); // const_cast if ( fnt ) was = (HFONT) SelectObject(dc,fnt); - + GetTextMetrics(dc, &tm); if ( fnt && was ) { @@ -5123,7 +5128,7 @@ bool wxGetKeyState(wxKeyCode key) // get the toggle state of the special key state = GetKeyState(vkey); break; - + default: // Get the current state of the physical key state = GetAsyncKeyState(vkey); @@ -5902,7 +5907,7 @@ static void wxAdjustZOrder(wxWindow* parent) // Set the z-order correctly SetWindowPos((HWND) parent->GetHWND(), HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE); } - + wxWindowList::compatibility_iterator current = parent->GetChildren().GetFirst(); while (current) { @@ -5920,7 +5925,7 @@ void wxWindowMSW::OnInitDialog( wxInitDialogEvent& event ) #if wxUSE_STATBOX wxAdjustZOrder(this); #endif - + event.Skip(); } #endif