41 , m_textColor(CLR_INVALID), m_backColor(CLR_INVALID), m_backMode(-1)
42 , m_font(NULL), m_brush(NULL), m_pen(NULL), m_bitmap(NULL)
61 if ( m_textColor != CLR_INVALID )
64 m_textColor = CLR_INVALID;
66 if ( m_backColor != CLR_INVALID )
69 m_backColor = CLR_INVALID;
71 if ( m_backMode >= 0 )
78 ::SelectObject(m_dc, m_font);
81 if ( m_brush != NULL )
83 ::SelectObject(m_dc, m_brush);
88 ::SelectObject(m_dc, m_pen);
91 if ( m_bitmap != NULL )
93 ::SelectObject(m_dc, m_bitmap);
105 if ( m_textColor == CLR_INVALID )
118 if ( m_backColor == CLR_INVALID )
131 if ( m_backMode < 0 )
143 HGDIOBJ r = ::SelectObject(m_dc, brush);
144 if ( m_brush == NULL )
146 m_brush =
static_cast<HBRUSH
>(r);
156 HGDIOBJ r = ::SelectObject(m_dc, pen);
159 m_pen =
static_cast<HPEN
>(r);
169 HGDIOBJ r = ::SelectObject(m_dc, bitmap);
170 if ( m_bitmap == NULL )
172 m_bitmap =
static_cast<HBITMAP
>(r);
182 HGDIOBJ r = ::SelectObject(m_dc, font);
183 if ( m_font == NULL )
185 m_font =
static_cast<HFONT
>(r);
199 SelectFont(
static_cast<HFONT
>(pFont->GetSafeHandle()));
207 COLORREF m_textColor;
208 COLORREF m_backColor;
void SelectFont(CFont *pFont)
[選択] フォント選択.
void SelectBrush(HBRUSH brush)
[選択] ブラシ選択.
void SetTextColor(COLORREF c)
[設定] 文字色設定.
void SelectBitmap(HBITMAP bitmap)
[選択] 画像選択.
void Restore(void)
[設定] リストア.
void SetBkColor(COLORREF c)
[設定] 背景色設定.
void SetBkMode(int mode)
[設定] 背景モード設定.
void SelectPen(HPEN pen)
[選択] ペン選択.
CDcSelectAssistant(HDC dc)
コンストラクタ.
~CDcSelectAssistant(void)
デストラクタ.
void SelectFont(HFONT font)
[選択] フォント選択.