Added handler for WM_PRINT to assist with offscreen drawing of widgets

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23353 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2003-09-01 19:56:28 +00:00
parent 8c14bc9170
commit 5c6c31763f

View File

@ -91,6 +91,7 @@
#include "wx/textctrl.h"
#include "wx/notebook.h"
#include "wx/listctrl.h"
#include <string.h>
@ -265,7 +266,7 @@ WX_BEGIN_FLAGS( wxWindowStyle )
WX_FLAGS_MEMBER(wxBORDER_RAISED)
WX_FLAGS_MEMBER(wxBORDER_STATIC)
WX_FLAGS_MEMBER(wxBORDER_NONE)
// old style border flags
WX_FLAGS_MEMBER(wxSIMPLE_BORDER)
WX_FLAGS_MEMBER(wxSUNKEN_BORDER)
@ -2319,6 +2320,20 @@ long wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam
break;
}
case WM_PRINT:
{
// Don't call the wx handlers in this case
if ( wxIsKindOf(this, wxListCtrl) )
break;
if ( lParam & PRF_ERASEBKGND )
HandleEraseBkgnd((WXHDC)(HDC)wParam);
wxPaintDCEx dc((wxWindow *)this, (WXHDC)wParam);
processed = HandlePaint();
}
break;
case WM_CLOSE:
#ifdef __WXUNIVERSAL__
// Universal uses its own wxFrame/wxDialog, so we don't receive