- //
- // Default mode is BM_LEAVEALONE so we make no call Set the mix
- //
- SetBackground(wxBrush(m_canvas->GetBackgroundColour(), wxSOLID));
-}
+ //
+ // default under PM is that Window and Client DC's are the same
+ //
+ m_hDC = (WXHDC) ::WinOpenWindowDC(GetWinHwnd(pTheCanvas));
+ m_hPS = ::GpiCreatePS( wxGetInstance()
+ ,m_hDC
+ ,&vSizl
+ ,PU_PELS | GPIF_LONG | GPIA_ASSOC
+ );
+
+ // 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);
+ }
+ //
+ // Default mode is BM_LEAVEALONE so we make no call Set the mix
+ //
+ SetBackground(wxBrush( m_pCanvas->GetBackgroundColour()
+ ,wxSOLID
+ )
+ );
+} // end of wxClientDC::wxClientDC