When I use the ocx window wrapper class to display my ActiveX control it always seems to be drawn with focus. My control's display depends on the focus state.

Please derive from CGXOCXWndWrapper (override the draw method) and copy the draw method code from CGXWndWrapper. Add these two lines after the call to ShowWindow and before the if statement that follows as shown below:

   m_pWnd->Invalidate();
   m_pWnd->ShowWindow(SW_SHOW);
///////////////////////////////////////////////////////////////
   if(!IsActive())
      GridWnd()->SetFocus();
///////////////////////////////////////////////////////////////
   if (nRow > Grid()->GetFrozenRows() 
&& (Grid()->GetTopRow() > nRow 
   || nCol > Grid()->GetFrozenCols() 
&& Grid()->GetLeftCol() > nCol))