X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d3b9f782ef3949f583e8ac53795d36787f044fc3..ca6911c361b04290fe1f0e64b616249b3b3d71ba:/include/wx/msw/window.h diff --git a/include/wx/msw/window.h b/include/wx/msw/window.h index 61f2bb4ae4..24015154e9 100644 --- a/include/wx/msw/window.h +++ b/include/wx/msw/window.h @@ -13,9 +13,15 @@ #ifndef _WX_WINDOW_H_ #define _WX_WINDOW_H_ -// --------------------------------------------------------------------------- -// constants -// --------------------------------------------------------------------------- +// if this is set to 1, we use deferred window sizing to reduce flicker when +// resizing complicated window hierarchies, but this can in theory result in +// different behaviour than the old code so we keep the possibility to use it +// by setting this to 0 (in the future this should be removed completely) +#ifdef __WXWINCE__ + #define wxUSE_DEFERRED_SIZING 0 +#else + #define wxUSE_DEFERRED_SIZING 1 +#endif // --------------------------------------------------------------------------- // wxWindow declaration for MSW @@ -556,16 +562,24 @@ private: bool HandleJoystickEvent(WXUINT msg, int x, int y, WXUINT flags); bool HandleNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result); +#if wxUSE_DEFERRED_SIZING +protected: + // this function is called after the window was resized to its new size + virtual void MSWEndDeferWindowPos() + { + m_pendingPosition = wxDefaultPosition; + m_pendingSize = wxDefaultSize; + } // current defer window position operation handle (may be NULL) WXHANDLE m_hDWP; -protected: // When deferred positioning is done these hold the pending changes, and // are used for the default values if another size/pos changes is done on // this window before the group of deferred changes is completed. wxPoint m_pendingPosition; wxSize m_pendingSize; +#endif // wxUSE_DEFERRED_SIZING private: #ifdef __POCKETPC__ @@ -573,7 +587,7 @@ private: #endif DECLARE_DYNAMIC_CLASS(wxWindowMSW) - DECLARE_NO_COPY_CLASS(wxWindowMSW) + wxDECLARE_NO_COPY_CLASS(wxWindowMSW); DECLARE_EVENT_TABLE() };