GiColor GiCanvasGdi::getBkColor() const { GiColor bkColor(GiColor::White()); if (m_draw->getDrawDC() != NULL) { COLORREF cr = ::GetBkColor(m_draw->getDrawDC()); bkColor.set(GetRValue(cr), GetGValue(cr), GetBValue(cr)); } return bkColor; }
// Allow = operator to be used for copying basics. // CEditEx& CEditEx::operator = ( const CEditEx& o ) { _ASSERT( o != *this ); // You probably did not mean to do this... if ( o == *this ) return *this; // copying self... bkColor( o.m_crBkColor ); textColor( o.m_crTextColor ); if ( o.m_pCFont ) { CLogFont pLogFont; o.m_pCFont->GetLogFont( &pLogFont ); setFont( &pLogFont ); } return *this; }