summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
304205f)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27667
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxWindowDC::wxWindowDC()
{
m_pCanvas = NULL;
wxWindowDC::wxWindowDC()
{
m_pCanvas = NULL;
+ m_PageSize.cx = m_PageSize.cy = 0;
+
}
wxWindowDC::wxWindowDC(
}
wxWindowDC::wxWindowDC(
{
ERRORID vError;
wxString sError;
{
ERRORID vError;
wxString sError;
+ DoGetSize(&nWidth, &nHeight);
+ m_PageSize.cx = nWidth;
+ m_PageSize.cy = nHeight;
m_hDC = (WXHDC) ::WinOpenWindowDC(GetWinHwnd(pTheCanvas) );
//
m_hDC = (WXHDC) ::WinOpenWindowDC(GetWinHwnd(pTheCanvas) );
//
,&m_PageSize
,PU_PELS | GPIF_LONG | GPIA_ASSOC
);
,&m_PageSize
,PU_PELS | GPIF_LONG | GPIA_ASSOC
);
+ if (!m_hPS)
+ {
+ vError = ::WinGetLastError(vHabmain);
+ sError = wxPMErrorToStr(vError);
+ wxLogError("Unable to create presentation space. Error: %s\n", sError.c_str());
+ }
::GpiAssociate(m_hPS, NULLHANDLE);
::GpiAssociate(m_hPS, m_hDC);
::GpiAssociate(m_hPS, NULLHANDLE);
::GpiAssociate(m_hPS, m_hDC);