+ //
+ // default under PM is that Window and Client DC's are the same
+ // so we offer a separate Presentation Space to use for the
+ // entire window. Otherwise, calling BeginPaint will just create
+ // chached-micro client presentation space
+ //
+ m_hPS = ::GpiCreatePS( vHabmain
+ ,m_hDC
+ ,&m_PageSize
+ ,PU_PELS | GPIF_LONG | GPIA_ASSOC
+ );
+ ::GpiAssociate(m_hPS, NULLHANDLE);
+ ::GpiAssociate(m_hPS, m_hDC);
+
+ //
+ // Set the wxWindows 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("Unable to set current color table. Error: %s\n", sError);
+ }
+ ::GpiCreateLogColorTable( m_hPS
+ ,0L
+ ,LCOLF_RGB
+ ,0L
+ ,0L
+ ,NULL
+ );
+ ::WinQueryWindowRect( GetWinHwnd(m_pCanvas)
+ ,&m_vRclPaint
+ );
+ InitDC();
+} // end of wxWindowDC::wxWindowDC
+
+void wxWindowDC::InitDC()