mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-08-17 17:02:51 +08:00
Revert "Document WS_EX_COMPOSITED impact on wxClientDC"
This reverts commit b0ed71658d.
This commit is contained in:
@@ -47,11 +47,11 @@ public:
|
||||
|
||||
@note While wxClientDC may also be used for drawing on the client area of a
|
||||
window from outside an EVT_PAINT() handler in some ports, this does @em not
|
||||
work on most of the platforms: neither wxOSX nor wxGTK with GTK 3 Wayland
|
||||
backend support this at all, so drawing using wxClientDC simply doesn't
|
||||
have any effect there. CanBeUsedForDrawing() can be used to determine
|
||||
whether wxClientDC can be used for drawing in the current environment, but
|
||||
it is recommended to only draw on the window using wxPaintDC, as this is
|
||||
work on all platforms: neither wxOSX nor wxGTK with GTK 3 Wayland backend
|
||||
support this at all, so drawing using wxClientDC simply doesn't have any
|
||||
effect there. CanBeUsedForDrawing() can be used to determine whether
|
||||
wxClientDC can be used for drawing in the current environment, but it is
|
||||
recommended to only draw on the window using wxPaintDC, as this is
|
||||
guaranteed to work everywhere. To redraw a small part of the window, use
|
||||
wxWindow::RefreshRect() to invalidate just this part and check
|
||||
wxWindow::GetUpdateRegion() in the paint event handler to redraw this part
|
||||
|
||||
@@ -4315,39 +4315,6 @@ public:
|
||||
///@}
|
||||
|
||||
|
||||
/**
|
||||
Disable the use native double buffering in wxMSW.
|
||||
|
||||
This MSW-specific function can be used to disable the use of
|
||||
`WS_EX_COMPOSITED` for this window and all of its parents and so allow
|
||||
using wxClientDC with it.
|
||||
|
||||
`WS_EX_COMPOSITED` style is turned on by default when creating the
|
||||
windows and it is strongly recommended @e not to use this functions to
|
||||
remove it, but to instead change the drawing code to avoid using
|
||||
wxClientDC.
|
||||
|
||||
If you do need to use it, please note that this function doesn't exist
|
||||
in the other ports and has to be explicitly bracketed by the checks for
|
||||
wxMSW, e.g.
|
||||
@code
|
||||
MyFrame::MyFrame(...)
|
||||
{
|
||||
auto p = new wxPanel(this);
|
||||
#ifdef __WXMSW__
|
||||
p->MSWDisableComposited();
|
||||
#endif
|
||||
|
||||
// Using wxClientDC will work now with this panel in wxMSW --
|
||||
// although it still won't with wxOSX nor wxGTK under Wayland.
|
||||
}
|
||||
@endcode
|
||||
|
||||
@see wxClientDC
|
||||
|
||||
@since 3.3.0
|
||||
*/
|
||||
void MSWDisableComposited();
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user