Document that wxEraseEvent::GetDC() never returns NULL.

This makes implementation of EVT_ERASE_BACKGROUND handlers simpler.

Closes #13736.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69954 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-12-08 13:07:53 +00:00
parent b0c7cd8ed5
commit 5fafec4d9f

View File

@@ -2852,12 +2852,8 @@ public:
To intercept this event, use the EVT_ERASE_BACKGROUND macro in an event table To intercept this event, use the EVT_ERASE_BACKGROUND macro in an event table
definition. definition.
You must call wxEraseEvent::GetDC and use the returned device context if it is You must use the device context returned by GetDC() to draw on, don't create
non-@NULL. If it is @NULL, create your own temporary wxClientDC object. a wxPaintDC in the event handler.
@remarks
Use the device context returned by GetDC to draw on, don't create
a wxPaintDC in the event handler.
@beginEventTable{wxEraseEvent} @beginEventTable{wxEraseEvent}
@event{EVT_ERASE_BACKGROUND(func)} @event{EVT_ERASE_BACKGROUND(func)}
@@ -2879,6 +2875,8 @@ public:
/** /**
Returns the device context associated with the erase event to draw on. Returns the device context associated with the erase event to draw on.
The returned pointer is never @NULL.
*/ */
wxDC* GetDC() const; wxDC* GetDC() const;
}; };