void CHintBar::OnPaint(CDC& rDC) { // Draw the hint. rDC.Select(CApp::This().DefaultFont()); rDC.TextColour(GetSysColor(COLOR_BTNTEXT)); rDC.BkMode(TRANSPARENT); rDC.TextOut(INNER_BORDER_SIZE, INNER_BORDER_SIZE, m_strHint); }
void CStatusBarLabel::OnPaint(CDC& rDC) { // Draw the label. rDC.Select(CApp::This().DefaultFont()); rDC.TextColour(GetSysColor(COLOR_BTNTEXT)); rDC.BkMode(TRANSPARENT); rDC.TextOut(BORDER_SIZE, BORDER_SIZE, m_strLabel); // Draw border last. CStatusBarPanel::OnPaint(rDC); }
void CTabCtrl::DrawTab(CDC& rDC, int iTabNum, bool bActive) const { // Get tab position. CRect rcTab = TabPos(iTabNum); // Draw lower border. if (bActive) { rDC.Pen(GetSysColor(COLOR_BTNFACE)); rDC.Line(rcTab.left+1, rcTab.bottom-1, rcTab.right, rcTab.bottom-1); rDC.Line(rcTab.left+1, rcTab.bottom, rcTab.right, rcTab.bottom); } else { rDC.Pen(GetSysColor(COLOR_BTNHIGHLIGHT)); rDC.Line(rcTab.left+1, rcTab.bottom-1, rcTab.right, rcTab.bottom-1); rDC.Pen(GetSysColor(COLOR_BTNFACE)); rDC.Line(rcTab.left+1, rcTab.bottom, rcTab.right, rcTab.bottom); } // Draw edges. rDC.Pen(GetSysColor(COLOR_BTNHIGHLIGHT)); rDC.Line(rcTab.left, rcTab.bottom-1, rcTab.left, rcTab.top+TAB_TOP_OFFSET); rDC.Line(rcTab.left, rcTab.top+TAB_TOP_OFFSET, rcTab.left+TAB_TOP_OFFSET, rcTab.top); rDC.Line(rcTab.left+TAB_TOP_OFFSET, rcTab.top, rcTab.right-TAB_TOP_OFFSET, rcTab.top); rDC.Pen(GetSysColor(COLOR_BTNSHADOW)); rDC.Line(rcTab.right-TAB_TOP_OFFSET-1, rcTab.top, rcTab.right-1, rcTab.top+TAB_TOP_OFFSET); rDC.Line(rcTab.right-1, rcTab.top+TAB_TOP_OFFSET, rcTab.right-1, rcTab.bottom-1); rDC.Pen(RGB(0,0,0)); rDC.Line(rcTab.right-TAB_TOP_OFFSET, rcTab.top, rcTab.right, rcTab.top+TAB_TOP_OFFSET); rDC.Line(rcTab.right, rcTab.top+TAB_TOP_OFFSET, rcTab.right, rcTab.bottom-1); // Draw title. rDC.TextColour(GetSysColor(COLOR_BTNTEXT)); rDC.BkMode(TRANSPARENT); rDC.Font(m_hTabFont); rDC.TextOut(rcTab.left+TITLE_BORDER_CX, rcTab.top+TITLE_BORDER_CY, m_pPageTable[iTabNum].strTitle); }