// Created: 09/21/99
// RCS-ID: $Id$
// Copyright: (c) David Webster
-// Licence: wxWidgets licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// ===========================================================================
wxWindowDC::wxWindowDC()
{
m_pCanvas = NULL;
+ m_PageSize.cx = m_PageSize.cy = 0;
+
}
wxWindowDC::wxWindowDC(
{
ERRORID vError;
wxString sError;
+ int nWidth, nHeight;
m_pCanvas = pTheCanvas;
+ DoGetSize(&nWidth, &nHeight);
+ m_PageSize.cx = nWidth;
+ m_PageSize.cy = nHeight;
m_hDC = (WXHDC) ::WinOpenWindowDC(GetWinHwnd(pTheCanvas) );
//
,&m_PageSize
,PU_PELS | GPIF_LONG | GPIA_ASSOC
);
+ if (!m_hPS)
+ {
+ vError = ::WinGetLastError(vHabmain);
+ sError = wxPMErrorToStr(vError);
+ wxLogError(_T("Unable to create presentation space. Error: %s\n"), sError.c_str());
+ }
::GpiAssociate(m_hPS, NULLHANDLE);
::GpiAssociate(m_hPS, m_hDC);
{
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
- wxLogError("Unable to set current color table. Error: %s\n", sError.c_str());
+ wxLogError(_T("Unable to set current color table. Error: %s\n"), sError.c_str());
}
::GpiCreateLogColorTable( m_hPS
,0L
SetFont(*pFont);
delete pFont;
//
- // OS/2 default vertical character allignment needs to match the other OS's
+ // OS/2 default vertical character alignment needs to match the other OS's
//
::GpiSetTextAlignment((HPS)GetHPS(), TA_NORMAL_HORIZ, TA_BOTTOM);
{
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
- wxLogError("Unable to set current color table. Error: %s\n", sError.c_str());
+ wxLogError(_T("Unable to set current color table. Error: %s\n"), sError.c_str());
}
::GpiCreateLogColorTable( m_hPS
,0L