TNB Library
TnbMfcDrawingButton.h
[詳解]
1#pragma once
13#include "TnbPartsDrawable.h"
15#include "TnbMfcBitmapDC.h"
16#include "TnbWndTextDrawer.h"
17
18
19
20//TNB Library
21namespace TNB {
22namespace MFC {
23
24
25
45{
46 DEFSUPER(CAbstractButton);
47 typedef CDrawTextBase _text;
48 enum { TIMERID_DRAW = 1 };
50 enum EKind
51 {
52 BUTTON = DFCS_BUTTONPUSH,
53 CHECKBOX = DFCS_BUTTONCHECK,
54 CB3STATE = DFCS_BUTTON3STATE,
55 RADIOBUTTON = DFCS_BUTTONRADIO,
56 };
57 bool m_boIsAuto;
58 int m_checkState;
59 CBitmapHandle m_buttonBitmap;
60 CBitmapHandle m_lastBitmap;
61 int m_bitmapChangeTime;
62 // チェック変更(グループ内の他のをオフにする)
63 void m_SetCheck(int c)
64 {
65 if ( c < 0 || c > 2 ) { c = 1;/*0以外なら1にしておく*/ }
66 if ( m_checkState != c )
67 {
68 m_buttonBitmap.Null();
69 m_checkState = c;
70 _super::Invalidate();
71 }
72 if ( m_kind == RADIOBUTTON )
73 {
74 if ( c == BST_CHECKED )
75 {
76 CWnd* pParent = _super::GetParent();
77 HWND hWnd = m_hWnd;
78 while ( true )
79 {
80 HWND h = ::GetNextDlgGroupItem(*pParent, hWnd, true);
81 if ( h == NULL || h == m_hWnd ) { break; }
82 ::SendMessage(h, BM_SETCHECK, BST_UNCHECKED, 0);
83 hWnd = h;
84 }
85 _super::ModifyStyle(0, WS_TABSTOP);
86 }
87 else
88 {
89 _super::ModifyStyle(WS_TABSTOP, 0);
90 }
91 }
92 }
93 EKind m_kind;
94 LONG m_originalStyle;
95 LONG m_originalExStyle;
96 IPartsDrawable* m_pPartsDraw;
97 IDrawable::Ptr m_pNormalDraw;
98 IDrawable::Ptr m_pDisableDraw;
99protected:
100
105 EKind GetKind(void) const { return m_kind; }
106
111 LONG GetOriginalStyle(void) const { return m_originalStyle; }
112
117 IPartsDrawable* ReferPartsDraw(void) { return m_pPartsDraw; }
118
124 bool IsPushButtonStyle(void) const
125 {
126 return (m_kind == BUTTON || (m_originalStyle & BS_PUSHLIKE) != 0);
127 }
128
135 virtual int GetLineHeight(CDC* pDC)
136 {
137 return 16;
138 }
139
144 virtual void OnDrawButton(CDC* pDC)
145 {
146 if ( ! m_buttonBitmap.IsNull() )
147 {
148 m_buttonBitmap.Draw(*pDC);
149 return;
150 }
151 MakeButtonImage(pDC);
152 _super::KillTimer(TIMERID_DRAW);
153 if ( m_lastBitmap.IsNull() || m_bitmapChangeTime == 0 )
154 {
155 m_buttonBitmap.Draw(*pDC);
156 m_lastBitmap = m_buttonBitmap;
157 }
158 else
159 {
160 CBitmapImage bi;
161 VERIFYLIB( bi.Set(m_buttonBitmap) );
162 VERIFYLIB( bi.InsertOnAlphaBlend(0, 0, m_lastBitmap, 50) );//50%合成
163 bi.Draw(*pDC);
164 m_lastBitmap = m_buttonBitmap;
165 _super::SetTimer(TIMERID_DRAW, m_bitmapChangeTime, NULL);
166 }
167 }
168
173 void MakeButtonImage(CDC* pDC)
174 {
175 CBitmapImage bi;
176 bi.Set(MFCLIB::GetParentImage(this, CLR_AUTOSELECT));
177 CBitmapDC dc(&bi);
178 dc.SetTextColor(pDC->GetTextColor());
179 CWnd* pWnd = _super::GetParent();
180 if ( pWnd != NULL )
181 {
182 pWnd->SendMessage(WM_CTLCOLORBTN,
183 reinterpret_cast<WPARAM>(dc.GetSafeHdc()), reinterpret_cast<LPARAM>(m_hWnd));
184 }
185 const IDrawable* pDraw = m_pNormalDraw;
186 UINT uState = 0;
187 #ifdef DFCS_TRANSPARENT
188 uState |= DFCS_TRANSPARENT;
189 #endif
190 switch ( _super::GetButtonState() )
191 {
192 case ES_Pushed:
193 uState |= DFCS_PUSHED;
194 break;
195 case ES_Hover:
196 #ifdef DFCS_HOT
197 uState |= DFCS_HOT;
198 #endif
199 break;
200 case ES_Disable:
201 uState |= DFCS_INACTIVE;
202 if ( ! m_pDisableDraw.IsNull() )
203 {
204 pDraw = m_pDisableDraw;
205 }
206 break;
207 }
208 if ( HasFocus() )
209 {
210 uState |= DFCS_FOCUS;
211 }
212 //
213 bool isPushType = IsPushButtonStyle();
214 if ( m_kind == BUTTON )
215 {
216 uState |= DFCS_BUTTONPUSH;
217 }
218 else
219 {
220 EKind kind = m_kind;
221 if ( kind == CB3STATE && m_checkState == BST_CHECKED )
222 {
223 kind = CHECKBOX;
224 }
225 if ( (m_originalStyle & BS_PUSHLIKE) != 0)
226 {
227 uState |= DFCS_BUTTONPUSH;
228 }
229 else
230 {
231 uState |= kind;
232 }
233 if ( kind == CB3STATE )
234 {
235 if ( m_checkState == BST_INDETERMINATE )
236 {
237 uState |= DFCS_CHECKED;
238 }
239 }
240 else if ( m_checkState == BST_CHECKED )
241 {
242 uState |= DFCS_CHECKED;
243 }
244 }
245 #ifdef DFCS_FLAT
246 if ( (m_originalStyle & BS_FLAT) != 0 )
247 {
248 uState |= DFCS_FLAT;
249 }
250 #endif
251 CRect rc;
252 _super::GetClientRect(rc);
253 if ( isPushType )
254 {
255 m_pPartsDraw->DrawButtonControl(dc, rc, uState);
256 }
257 else
258 {
259 CRect r = rc;
260 m_pPartsDraw->DrawButtonControl(NULL, r, uState);
261 int l = (GetLineHeight(pDC) - r.Height() + 1) / 2;
262 switch( m_originalStyle & 0x0C00 )
263 {
264 case BS_TOP:/*0x00000400L*/
265 r.OffsetRect(0, l);
266 break;
267 case BS_BOTTOM:/*0x00000800L*/
268 r.OffsetRect(0, rc.Height() - r.bottom - l);
269 break;
270 default:
271 case BS_VCENTER:/*0x00000C00L*/
272 r.OffsetRect(0, (rc.Height() - r.bottom) / 2);
273 break;
274 }
275 if ( (m_originalStyle & BS_LEFTTEXT) != 0 || (m_originalExStyle & WS_EX_RIGHT) != 0 )
276 {
277 //左に
278 r.left = rc.right - r.right;
279 r.right = rc.right;
280 m_pPartsDraw->DrawButtonControl(dc, r, uState);
281 rc.right -= r.Width() + 3;
282 }
283 else
284 {
285 //右に
286 m_pPartsDraw->DrawButtonControl(dc, r, uState);
287 rc.left += r.Width() + 3;
288 }
289 }
290 if ( pDraw != NULL )
291 {
292 SIZE size;
293 pDraw->GetSize(size);
294 int x = 0;
295 int y = (rc.Height() - size.cy) / 2;
296 if ( isPushType )
297 {
298 x = (rc.Width() - size.cx) / 2;
299 if ( _super::GetButtonState() == ES_Pushed )
300 {
301 POINT po;
302 m_pPartsDraw->GetPushedOffset(po);
303 rc.OffsetRect(po);
304 }
305 }
306 else if ( (m_originalExStyle & WS_EX_RIGHT) != 0 )
307 {
308 x = rc.Width() - size.cx;
309 }
310 pDraw->Draw(dc, rc.left + x, rc.top + y);
311 //
312 if ( isPushType && m_kind == CB3STATE && m_checkState == BST_INDETERMINATE )
313 {
314 CRect rc;
315 _super::GetClientRect(rc);
316 CBitmapImage bi;
317 bi.Set(rc.Width(), rc.Height());
318 {
319 CBitmapDC d(&bi);
320 m_pPartsDraw->DrawButtonControl(d, rc, uState);
321 }
322 bi.AlphaBlend(dc, 0, 0, 50);
323 }
324 //
325 if ( HasFocus() )
326 {
327 if ( isPushType )
328 {
329 POINT po;
330 m_pPartsDraw->GetEdgeOffset(po);
331 rc.DeflateRect(po.x + 1, po.y + 1);
332 if ( _super::GetButtonState() == ES_Pushed )
333 {
334 CPoint po;
335 m_pPartsDraw->GetPushedOffset(po);
336 rc.OffsetRect(-po);
337 }
338 }
339 else
340 {
341 rc.left += x;
342 rc.top += y;
343 rc.right = rc.left + size.cx;
344 rc.bottom = rc.top + size.cy;
345 }
346 m_pPartsDraw->DrawFocusRect(dc, &rc);
347 }
348 }
349 CBitmapImage* P = dc.Detach();
350 m_buttonBitmap = P->GetBitmapHandle();
351 }
352
357 virtual void OnClickButton(void)
358 {
359 if ( m_boIsAuto )
360 {
361 int c = BST_CHECKED;
362 if ( m_kind != RADIOBUTTON )
363 {
364 switch( m_checkState )
365 {
366 default:
367 ASSERT( false );
368 //以下へ続く
369 case BST_UNCHECKED:
370 c = BST_CHECKED;
371 break;
372 case BST_CHECKED:
373 c = (m_kind == CB3STATE) ? BST_INDETERMINATE : BST_UNCHECKED;
374 break;
375 case BST_INDETERMINATE:
376 c = BST_UNCHECKED;
377 break;
378 };
379 }
380 m_SetCheck(c);
381 }
382 }
383
389 virtual void OnChangeState(EState state)
390 {
391 m_buttonBitmap.Null();
392 }
393
403 virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
404 {
405 switch( message )
406 {
407 case WM_TIMER:
408 if ( wParam == TIMERID_DRAW )
409 {
410 KillTimer(TIMERID_DRAW);
411 CClientDC dc(this);
412 m_lastBitmap.Draw(dc);
413 }
414 break;
415 case WM_GETDLGCODE:
416 if ( m_kind == RADIOBUTTON )
417 {
418 return DLGC_RADIOBUTTON | DLGC_BUTTON;
419 }
420 else if ( m_kind != BUTTON )
421 {
422 return DLGC_BUTTON;
423 }
424 break;
425 case BM_GETSTATE:
426 return _super::WindowProc(message, wParam, lParam) | m_checkState;
427 case BM_GETCHECK:
428 return m_checkState;
429 case BM_SETCHECK:
430 m_SetCheck(ToInt(wParam));
431 return 0;
432 case BM_SETSTYLE:
433 if ( lParam != 0 ) { RedrawWindow(); }
434 return 0;
435 }
436 return _super::WindowProc(message, wParam, lParam);
437 }
438
444 virtual void PreSubclassWindow(void)
445 {
446 m_checkState = BST_UNCHECKED;
447 m_originalStyle = ::GetWindowLong(m_hWnd, GWL_STYLE);
448 m_originalExStyle = ::GetWindowLong(m_hWnd, GWL_EXSTYLE);
449 m_boIsAuto = false;
450 bool canSendDblClk = ((m_originalStyle & BS_NOTIFY) != 0);
451 switch ( m_originalStyle & BS_TYPEMASK )
452 {
453 case BS_AUTOCHECKBOX:
454 m_boIsAuto = true;
455 m_kind = CHECKBOX; //チェックボックス
456 break;
457 case BS_CHECKBOX:
458 m_kind = CHECKBOX; //チェックボックス
459 break;
460 case BS_AUTO3STATE:
461 m_boIsAuto = true;
462 m_kind = CB3STATE; //3ステートチェックボックス
463 break;
464 case BS_3STATE:
465 m_kind = CB3STATE; //3ステートチェックボックス
466 break;
467 case BS_AUTORADIOBUTTON:
468 m_boIsAuto = true;
469 m_kind = RADIOBUTTON; //ラジオボタン
470 break;
471 case BS_RADIOBUTTON:
472 canSendDblClk = true;
473 m_kind = RADIOBUTTON; //ラジオボタン
474 break;
475 case BS_DEFPUSHBUTTON:
476 {
477 CWnd* P = _super::GetParent();
478 if ( P != NULL ) { P->SendMessage(DM_SETDEFID, _super::GetDlgCtrlID(), 0); }
479 }
480 m_kind = BUTTON; //普通のボタン
481 break;
482 default:
483 m_kind = BUTTON; //普通のボタン
484 break;
485 }
486 _super::SetSendDblClkMode(canSendDblClk);
487 _super::PreSubclassWindow();
488 m_buttonBitmap.Null();
489 }
490
491public:
492
494 CDrawingButton(void) : _super(), m_pPartsDraw(NULL), m_bitmapChangeTime(50)
495 {
496 SetPartsDrawer(NULL);
497 }
498
505 void SetPartsDrawer(IPartsDrawable* pPartsDraw = NULL)
506 {
507 if ( pPartsDraw != NULL )
508 {
509 m_pPartsDraw = pPartsDraw;
510 }
511 else
512 {
513 static CStandardPartsDrawer s_partsDrawer;
514 m_pPartsDraw = &s_partsDrawer;
515 }
516 }
517
527 {
528 m_bitmapChangeTime = ms;
529 }
530
535 void SetNormalDrawer(const IDrawable& draw)
536 {
537 m_pNormalDraw = draw.Clone();
538 if ( ::IsWindow(*this) )
539 {
540 m_buttonBitmap.Null();
541 }
542 }
543
548 void SetDisableDrawer(const IDrawable& draw)
549 {
550 m_pDisableDraw = draw.Clone();
551 if ( ::IsWindow(*this) )
552 {
553 m_buttonBitmap.Null();
554 }
555 }
556
563 bool AdjustSize(void)
564 {
565 if ( m_kind == BUTTON || (m_originalStyle & BS_PUSHLIKE) != 0 )
566 {
567 if ( ! m_pNormalDraw.IsNull() )
568 {
569 SIZE sz;
570 m_pNormalDraw->GetSize(sz);
571 POINT po;
572 m_pPartsDraw->GetEdgeOffset(po);
573 return MFCLIB::ChangeClientSize(this, sz.cx + po.x * 2, sz.cy + po.y * 2);
574 }
575 return true; //調整なし
576 }
577 //
578 UINT uState = 0;
579 switch ( m_kind )
580 {
581 case RADIOBUTTON: uState = DFCS_BUTTONRADIO; break;
582 case CHECKBOX: uState = DFCS_BUTTONCHECK; break;
583 case CB3STATE: uState = DFCS_BUTTON3STATE; break;
584 default:
585 ASSERTLIB( false );
586 break;
587 }
588 CRect rc;
589 _super::GetClientRect(rc);
590 m_pPartsDraw->DrawButtonControl(NULL, rc, uState);
591 SIZE size = { 0, 0 };
592 if ( ! m_pNormalDraw.IsNull() )
593 {
594 m_pNormalDraw->GetSize(size);
595 }
596 size.cx += rc.Width() + 3;
597 size.cy = max(size.cy, rc.Height());
598 return MFCLIB::ChangeClientSize(this, size.cx, size.cy);
599 }
600
607 int GetCheck(void) const
608 {
609 return static_cast<int>(::SendMessage(m_hWnd, BM_GETCHECK, 0, 0));
610 }
611
626 void SetCheck(int nCheck)
627 {
628 ::SendMessage(m_hWnd, BM_SETCHECK, nCheck, 0);
629 }
630};
631
632
633
657{
658 DEFSUPER(CDrawingButton);
659protected:
660 COLORREF m_color;
664 {
665 if ( m_pText != NULL )
666 {
667 delete m_pText;
668 m_pText = NULL;
669 }
670 m_pText = D;
671 if ( m_pText != NULL )
672 {
673 m_pText->SetTextStyle(CTextDrawer::ButtonToDrawStyle(_super::GetOriginalStyle()));
675 }
676 }
683 virtual int GetLineHeight(CDC* pDC)
684 {
685 CFont* pFont = _super::GetFont();
686 if ( pFont != NULL )
687 {
688 CFont* old = pDC->SelectObject(pFont);
689 TEXTMETRIC t;
690 pDC->GetTextMetrics(&t);
691 pDC->SelectObject(old);
692 return t.tmHeight + t.tmExternalLeading * 2;
693 }
694 return 16; //適当
695 }
696
702 virtual bool HasFocus(void) const
703 {
704 return _super::IsPushButtonStyle() ? _super::HasFocus() : false;
705 }
706
712 virtual void PreSubclassWindow(void)
713 {
714 _super::PreSubclassWindow();
715 CRect rect;
716 _super::GetClientRect(&rect);
717 CWndTextDrawer* pText = NULL;
718 if ( ! _super::IsPushButtonStyle() )
719 {
720 IPartsDrawable* pParts = _super::ReferPartsDraw();
721 CRect r = rect;
722 pParts->DrawButtonControl(NULL, r, _super::GetKind());
723 rect.right -= r.Width() + 3;
724 pText = new CWndTextDrawer(rect.Size(), *this, m_color, 0, 2, 2, pParts);
725 }
726 else
727 {
728 POINT po;
729 _super::ReferPartsDraw()->GetEdgeOffset(po);
730 pText = new CWndTextDrawer(rect.Size(), *this, m_color, 0, po.x + 2, po.y + 2, NULL);
731 }
732 SetTextDrawer(pText);
733 }
734public:
735
737 CDrawingButtonTx(void) : m_color(CLR_AUTOSELECT), m_pText(NULL)
738 {
739 }
740
743 {
744 if ( m_pText != NULL )
745 {
746 delete m_pText;
747 m_pText = NULL;
748 }
749 }
750
756 void SetTextColor(COLORREF color)
757 {
758 m_color = color;
759 if ( m_pText != NULL )
760 {
762 _super::SetNormalDrawer(*m_pText);
763 m_pText->SetTextColor(CLR_INVALID);
764 _super::SetDisableDrawer(*m_pText);
765 _super::Invalidate();
766 }
767 }
768
775 bool AdjustSize(void)
776 {
777 if ( m_pText != NULL )
778 {
779 CRect rc;
780 GetClientRect(&rc);
781 // 文字列の描画大きさ計算
782 CString s;
783 _super::GetWindowText(s);
784 DWORD style = CTextDrawer::ButtonToDrawStyle(_super::GetOriginalStyle());
785 CDC* pDC = GetDC();
786 CGdiObject* old = pDC->SelectObject(_super::GetFont());
787 CSize textSize = rc.Size();
788 CTextDrawer::CalcTextSize(textSize, *pDC, style, s);
789 pDC->SelectObject(old);
790 ReleaseDC(pDC);
791 textSize.cx += 3;
792 textSize.cy += 4;
793 // 描画情報更新
794 CWndTextDrawer* pText = NULL;
795 if ( ! _super::IsPushButtonStyle() )
796 {
797 IPartsDrawable* pParts = _super::ReferPartsDraw();
798 pText = new CWndTextDrawer(textSize, *this, m_color, 0, 2, 2, pParts);
799 }
800 else
801 {
802 POINT po;
803 _super::ReferPartsDraw()->GetEdgeOffset(po);
804 pText = new CWndTextDrawer(textSize, *this, m_color, 0, po.x + 2, po.y + 2, NULL);
805 }
806 SetTextDrawer(pText);
807 return _super::AdjustSize();
808 }
809 return false;
810 }
811};
812
813
814
815}; //MFC
816}; //TNB
817
818
819
ボタン抽象関係のヘッダ
ビットマップDC関係のヘッダ
パーツ描画情報のヘッダ
WNDテキスト描画関係のヘッダ
ウィンドウ管理.
HBITMAP型ハンドルハンドル
bool Draw(HDC hdc, int x=0, int y=0) const
[処理] イメージ描画.
ビットマップイメージ管理クラス
bool Set(int cx, int cy, COLORREF color=CLR_INVALID)
[設定] イメージ設定.
CBitmapHandle GetBitmapHandle(void)
[取得] ビットマップハンドル取得
bool Draw(HDC hdc, int x=0, int y=0) const
[処理] イメージ描画.
bool InsertOnAlphaBlend(int x, int y, const CBitmapImage &bmpimg, int parsent=100, int cx=0, int cy=0)
[挿入] 半透過処理付イメージ挿入.
bool AlphaBlend(HDC hdc, int x, int y, int parsent=100, int cx=0, int cy=0) const
[描画] 半透明処理付イメージ描画.
bool IsNull(void) const
[確認] NULLチェック
void Null(void)
[設定] 開放.
static bool CalcTextSize(SIZE &_size, HDC dc, UINT drawStyle, LPCTSTR str)
[計算] 文字表示大きさ計算.
static DWORD ButtonToDrawStyle(DWORD buttonStyle)
[変換] ButtonスタイルをDrawTextスタイルに変換
WNDテキスト描画クラス
void SetTextColor(COLORREF color)
[設定] 色設定.
void SetTextStyle(DWORD style)
[設定] スタイル設定.
ボタンコントロール抽象クラス
virtual bool HasFocus(void) const
[確認] フォーカスの有無
ビットマップデバイスコンテキストクラス
CBitmapImage * Detach(void)
[設定] デタッチ.
テキスト描画ベースクラス
Definition: TnbMfcCommon.h:560
描画情報ボタンコントロール
~CDrawingButtonTx(void)
デストラクタ
void SetTextDrawer(CWndTextDrawer *D)
文字表示設定
CDrawingButtonTx(void)
コンストラクタ
bool AdjustSize(void)
[設定] サイズ調整.
virtual void PreSubclassWindow(void)
[通知] subclassing/unsubclassing functions.
virtual bool HasFocus(void) const
[確認] フォーカスの有無
void SetTextColor(COLORREF color)
[設定] テキストカラー設定
CWndTextDrawer * m_pText
文字表示
virtual int GetLineHeight(CDC *pDC)
[取得] 一行高さ.
COLORREF m_color
文字の色
描画情報ボタンコントロール
IPartsDrawable * ReferPartsDraw(void)
[取得] パーツ描画インターフェース取得.
bool IsPushButtonStyle(void) const
[確認] ボタンタイプ取得
int GetCheck(void) const
[取得] チェック状態取得.
void SetPartsDrawer(IPartsDrawable *pPartsDraw=NULL)
[設定] パーツ描画指定.
virtual void OnChangeState(EState state)
[通知] 状態変化通知.
LONG GetOriginalStyle(void) const
[取得] オリジナルスタイル取得.
void SetDisableDrawer(const IDrawable &draw)
[設定] Disable時の描画情報指定.
void SetCheck(int nCheck)
[設定] チェック状態設定.
CDrawingButton(void)
コンストラクタ
bool AdjustSize(void)
[設定] サイズ調整.
virtual void PreSubclassWindow(void)
[通知] subclassing/unsubclassing functions.
EKind GetKind(void) const
[取得] 種類取得.
void SetBitmapChangeTime(UINT ms)
[設定] ビットマップ切り替え時間設定.
virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
[通知] for processing Windows messages.
virtual void OnClickButton(void)
[通知] クリック.
virtual void OnDrawButton(CDC *pDC)
[処理] 描画.
void SetNormalDrawer(const IDrawable &draw)
[設定] 通常時の描画情報指定.
virtual int GetLineHeight(CDC *pDC)
[取得] 一行高さ.
void MakeButtonImage(CDC *pDC)
[処理] 描画.
標準WINDOWパーツ描画クラス
CBitmapHandle GetParentImage(CWnd *pWndControl, COLORREF backColor=CLR_INVALID)
[取得] 親画像取得.
Definition: TnbMfcCommon.h:266
bool ChangeClientSize(CWnd *pWnd, int cx=-1, int cy=-1)
[設定] クライアントサイズ設定.
Definition: TnbMfcCommon.h:102
int ToInt(LPCSTR lpsz, int iBase=10)
[変換] INT変換(ASCII/SJIS用).
Definition: TnbStrLib.h:367
TNB Library
Definition: TnbDoxyTitle.txt:2
描画情報インターフェース
Definition: TnbDrawable.h:37
virtual bool GetSize(SIZE &_size) const =0
[取得] サイズ取得.
virtual IDrawable * Clone(void) const =0
[作成] クローン作成.
virtual void Draw(HDC dc, int x=0, int y=0) const =0
[描画] 描画.
WINDOWパーツ描画インターフェース
virtual bool DrawFocusRect(HDC hdc, LPCRECT lpRect) const =0
[描画] フォーカス枠描画.
virtual void GetEdgeOffset(POINT &_po) const =0
[取得] エッジの幅、高さ.
virtual bool DrawButtonControl(HDC hdc, LPRECT _lprc, UINT uState) const =0
[描画] ボタンコントロール描画.
virtual void GetPushedOffset(POINT &_po) const =0
[取得] 押下状態のずれ.