+ m_hDC = (WXHDC) ::WinOpenWindowDC(GetWinHwnd(pTheCanvas));
+ printf("Got WindowDC %X for window handle %X\n", m_hDC, pTheCanvas);
+
+ m_hPS = ::GpiCreatePS( wxGetInstance()
+ ,m_hDC
+ ,&vSizl
+ ,PU_PELS | GPIF_LONG | GPIA_ASSOC
+ );
+ ::GpiAssociate(m_hPS, NULLHANDLE);
+ ::GpiAssociate(m_hPS, m_hDC);
+
+ printf("Got m_hPS %X\n", m_hPS);
+ // Set the wxWidgets color table
+ if (!::GpiCreateLogColorTable( m_hPS
+ ,0L
+ ,LCOLF_CONSECRGB
+ ,0L
+ ,(LONG)wxTheColourDatabase->m_nSize
+ ,(PLONG)wxTheColourDatabase->m_palTable
+ ))
+ {
+ vError = ::WinGetLastError(vHabmain);
+ sError = wxPMErrorToStr(vError);
+ wxLogError(wxT("Unable to set current color table (4). Error: %s\n"), sError.c_str());
+ }
+ ::GpiCreateLogColorTable( m_hPS
+ ,0L
+ ,LCOLF_RGB
+ ,0L
+ ,0L
+ ,NULL
+ );
+ //
+ // Set the DC/PS rectangle
+ //
+ ::WinQueryWindowRect( GetWinHwnd(m_pCanvas)
+ ,&m_vRclPaint
+ );
+ InitDC();
+} // end of wxClientDCImpl::wxClientDCImpl
+
+void wxClientDCImpl::InitDC()