WTL Controls
Back to the WTL Controls Home Page.
ODStatic.cpp
Go to the documentation of this file.
1 #include "StdAfx.h"
2 //--------------------------------------------------------------------------------------
3 //--------------------------------------------------------------------------------------
4 //
5 //
6 // WTL Control Library
7 // by
8 // Bright Ideas Software®
9 // Copyright © 2018 by Bright Ideas Software.
10 //
11 //
12 //
13 //--------------------------------------------------------------------------------------
14 //--------------------------------------------------------------------------------------
15 
16 
17 namespace BIS_WTL_CONTROLS
18 {
19  //----------------------------------------------------------------------------------------------
21  {
22  m_hMemDC = NULL;
23  m_hOldMap = NULL;
24 
25  m_bBtnFaceBkgnd = false;
26  m_clrTextColor = ::GetSysColor (COLOR_WINDOWTEXT);
27  m_clrBackColor = ::GetSysColor (COLOR_BTNFACE);
28 
29  m_bMultiLine = false;
30  m_bEndEllipsis = false;
31  m_bPathEllipsis = false;
32  m_vaVertAlign = CVertAlignment::vaMiddle;
33  m_haHorzAlign = CHorzAlignment::haLeft;
34  m_Text = "";
35 
36  m_iHorzMargin = 0;
37  m_iVertMargin = 0;
38 
39  m_bUseTheme = false;
41  m_ThemedTextStyle = CThemedTextStyle::ttMainInstruction;
42 
43  m_EdgeStyle = CEdgeStyle::esLine;
44 
45  m_bDirtyColor = true;
46  m_bUpdateContent = true; // redundant
47  m_hbrBackBrush = NULL;
48 
49 #ifndef _UNICODE
50  SetThemeClassList(CA2W("TEXTSTYLE;TASKDIALOG"));
51 #else
52  SetThemeClassList(_T("TEXTSTYLE;TASKDIALOG"));
53 #endif
54 
55  }
56  //----------------------------------------------------------------------------------------------
58  {
59 
60  ATLASSERT(m_hWnd == NULL);
61 
62  DestroyGDIStuff();
63 
64  if (m_hbrBackBrush != NULL)
65  {
66  ::DeleteObject (m_hbrBackBrush);
67  m_hbrBackBrush = NULL;
68  }
69  }
70  //----------------------------------------------------------------------------------------------
71  //----------------------------------------------------------------------------------------------
86  void CODStatic::SubclassStatic(HWND hWnd)
87  {
88  CWindowImpl<CODStatic, CStatic>::SubclassWindow(hWnd);
89 
90  DWORD style = GetStyle();
91  DWORD exstyle = GetExStyle();
92 
93  if (style & SS_CENTER)
94  m_haHorzAlign = CHorzAlignment::haCenter;
95  else if ((style & SS_RIGHT) ||(exstyle & WS_EX_RIGHT))
96  m_haHorzAlign = CHorzAlignment::haRight;
97  else
98  m_haHorzAlign = CHorzAlignment::haLeft;
99 
100  if (style & SS_LEFTNOWORDWRAP)
101  {
102  m_bMultiLine = false;
103  m_haHorzAlign = CHorzAlignment::haLeft;
104  }
105 
106  if (style & SS_ENDELLIPSIS)
107  {
108  m_bMultiLine = false;
109  m_haHorzAlign = CHorzAlignment::haLeft;
110  m_bEndEllipsis = true;
111  }
112  else
113  m_bEndEllipsis = false;
114 
115  GetWindowText(m_Text);
116 
117  OpenThemeData();
118 
119  ModifyStyle(0, SS_NOTIFY | SS_OWNERDRAW);
120 
121  }
122  //----------------------------------------------------------------------------------------------
130  {
131  DestroyGDIStuff();
132 
133  if (m_hbrBackBrush != NULL)
134  {
135  ::DeleteObject (m_hbrBackBrush);
136  m_hbrBackBrush = NULL;
137  }
138 
139  CloseThemeData();
140 
141  UnsubclassWindow();
142  }
143  //----------------------------------------------------------------------------------------------
144  //----------------------------------------------------------------------------------------------
153  {
154  return(m_bBtnFaceBkgnd);
155  }
156  //----------------------------------------------------------------------------------------------
175  void CODStatic::SetBtnFaceBkgnd(bool value)
176  {
177  if (m_bBtnFaceBkgnd != value)
178  {
179  m_bDirtyColor = true;
180  m_bBtnFaceBkgnd = value;
181  }
182  }
183  //----------------------------------------------------------------------------------------------
184  //----------------------------------------------------------------------------------------------
192  COLORREF CODStatic::GetBackColor() const
193  {
194  return(m_clrBackColor);
195  }
196  //----------------------------------------------------------------------------------------------
207  void CODStatic::SetBackColor(COLORREF value)
208  {
209  if (m_clrBackColor != value)
210  {
211  m_bDirtyColor = true;
212  m_clrBackColor = value;
213  }
214  }
215  //----------------------------------------------------------------------------------------------
216  //----------------------------------------------------------------------------------------------
217  //----------------------------------------------------------------------------------------------
225  COLORREF CODStatic::GetTextColor() const
226  {
227  return(m_clrTextColor);
228  }
229  //----------------------------------------------------------------------------------------------
240  void CODStatic::SetTextColor(COLORREF value)
241  {
242  if (m_clrTextColor != value)
243  {
244  m_bUpdateContent = true;
245  m_clrTextColor = value;
246  }
247  }
248  //----------------------------------------------------------------------------------------------
249  //----------------------------------------------------------------------------------------------
250  //----------------------------------------------------------------------------------------------
258  std::basic_string<TCHAR> CODStatic::GetCaption() const
259  {
260  return((LPCTSTR)m_Text);
261  }
262  //----------------------------------------------------------------------------------------------
274  void CODStatic::SetCaption(LPCTSTR text)
275  {
276  if (m_Text.Compare(text) != 0)
277  {
278  m_Text = text;
279  m_bUpdateContent = true;
280  }
281  }
282  //----------------------------------------------------------------------------------------------
283  //----------------------------------------------------------------------------------------------
292  {
293  return(m_bMultiLine);
294  }
295  //----------------------------------------------------------------------------------------------
308  {
309  if (m_bMultiLine != value)
310  {
311  m_bMultiLine = value;
312  m_bUpdateContent = true;
313  }
314  }
315  //----------------------------------------------------------------------------------------------
316  //----------------------------------------------------------------------------------------------
325  {
326  return(m_bEndEllipsis);
327  }
328  //----------------------------------------------------------------------------------------------
341  {
342  if (m_bEndEllipsis != value)
343  {
344  m_bEndEllipsis = value;
345  m_bUpdateContent = true;
346  }
347  }
348  //----------------------------------------------------------------------------------------------
349  //----------------------------------------------------------------------------------------------
358  {
359  return(m_bPathEllipsis);
360  }
361  //----------------------------------------------------------------------------------------------
374  {
375  if (m_bPathEllipsis != value)
376  {
377  m_bPathEllipsis = value;
378  m_bUpdateContent = true;
379  }
380  }
381  //----------------------------------------------------------------------------------------------
382  //----------------------------------------------------------------------------------------------
391  {
392  return(m_haHorzAlign);
393  }
394  //----------------------------------------------------------------------------------------------
408  {
409  if (m_haHorzAlign != value)
410  {
411  m_haHorzAlign = value;
412  m_bUpdateContent = true;
413  }
414  }
415  //----------------------------------------------------------------------------------------------
416  //----------------------------------------------------------------------------------------------
426  {
427  return(m_vaVertAlign);
428  }
429  //----------------------------------------------------------------------------------------------
443  {
444  if (m_vaVertAlign != value)
445  {
446  m_vaVertAlign = value;
447  m_bUpdateContent = true;
448  }
449  }
450  //----------------------------------------------------------------------------------------------
451  //----------------------------------------------------------------------------------------------
460  {
461  return(m_EdgeStyle);
462  }
463  //----------------------------------------------------------------------------------------------
478  {
479  if (m_EdgeStyle != style)
480  {
481  m_EdgeStyle = style;
482  m_bUpdateContent = true;
483  }
484  }
485  //----------------------------------------------------------------------------------------------
486  //----------------------------------------------------------------------------------------------
495  {
496  return(m_iVertMargin);
497  }
498  //----------------------------------------------------------------------------------------------
509  {
510  if ((margin >= 0)&&(m_iVertMargin != margin))
511  {
512  m_iVertMargin = margin;
513  m_bUpdateContent = true;
514  }
515  }
516  //----------------------------------------------------------------------------------------------
517  //----------------------------------------------------------------------------------------------
526  {
527  return(m_iHorzMargin);
528  }
529  //----------------------------------------------------------------------------------------------
540  {
541  if ((margin >= 0)&&(m_iHorzMargin != margin))
542  {
543  m_iHorzMargin = margin;
544  m_bUpdateContent = true;
545  }
546  }
547  //----------------------------------------------------------------------------------------------
548  //----------------------------------------------------------------------------------------------
557  {
558  return(m_bUseTheme);
559  }
560  //----------------------------------------------------------------------------------------------
567 
571  {
572  if (m_bUseTheme != val)
573  {
574  m_bUseTheme = val;
575  m_bUpdateContent = true;
576  }
577  }
578  //----------------------------------------------------------------------------------------------
579  //----------------------------------------------------------------------------------------------
588  {
589  return(m_ThemedBackStyle);
590  }
591  //----------------------------------------------------------------------------------------------
621  {
622  if (val != m_ThemedBackStyle)
623  {
624  m_ThemedBackStyle = val;
625  m_bUpdateContent = true;
626  }
627  }
628  //----------------------------------------------------------------------------------------------
629  //----------------------------------------------------------------------------------------------
638  {
639  return(m_ThemedTextStyle);
640  }
641  //----------------------------------------------------------------------------------------------
678  {
679  if (m_ThemedTextStyle != val)
680  {
681  m_ThemedTextStyle = val;
682  m_bUpdateContent = true;
683  }
684  }
685  //----------------------------------------------------------------------------------------------
686  //----------------------------------------------------------------------------------------------
694  {
695  m_bUpdateContent = true;
696  Invalidate();
697  UpdateWindow();
698  }
699  //----------------------------------------------------------------------------------------------
700  //----------------------------------------------------------------------------------------------
701  //
702  // Private Methods
703  //
704  //----------------------------------------------------------------------------------------------
705  //----------------------------------------------------------------------------------------------
706  int CODStatic::GetEdgeOffset(int metric)
707  {
708  int retval = 0;
709 
710  switch(m_EdgeStyle)
711  {
712  case CEdgeStyle::esNone:
713  break;
714 
715  case CEdgeStyle::esLine:
718  retval = 1;
719  break;
720 
721  case CEdgeStyle::esBump:
725  retval = ::GetSystemMetrics(metric);
726  break;
727  }
728 
729  return(retval);
730  }
731  //----------------------------------------------------------------------------------------------
732  int CODStatic::GetHorzEdgeHeight()
733  {
734  return (GetEdgeOffset(SM_CXEDGE));
735  }
736  //----------------------------------------------------------------------------------------------
737  int CODStatic::GetVertEdgeWidth()
738  {
739  return (GetEdgeOffset(SM_CYEDGE));
740  }
741  //----------------------------------------------------------------------------------------------
742  //----------------------------------------------------------------------------------------------
743  void CODStatic::PrepareGDIStuff()
744  {
745  DestroyGDIStuff();
746 
747  CRect r;
748  GetClientRect(&r);
749 
750  if (IsWindow())
751  {
752  if ((r.Width() > 0)&&(r.Height() > 0))
753  {
754  m_hCanvas.Create(r.Width(), r.Height(), 24, 0);
755 
756  if (! m_hCanvas.IsNull())
757  {
758 
759  HDC dc = ::GetDC(m_hWnd);
760  m_hMemDC = ::CreateCompatibleDC(dc);
761 
762  if (m_hMemDC != NULL)
763  m_hOldMap = (HBITMAP)::SelectObject(m_hMemDC, (HBITMAP)m_hCanvas);
764  else
765  m_hCanvas.Destroy();
766 
767  ::ReleaseDC(m_hWnd, dc);
768  m_bUpdateContent = true;
769  }
770  }
771  }
772  }
773  //----------------------------------------------------------------------------------------------
774  void CODStatic::DestroyGDIStuff()
775  {
776 
777  if (m_hMemDC != NULL)
778  {
779  if (! m_hCanvas.IsNull())
780  {
781  ::SelectObject(m_hMemDC, m_hOldMap);
782  m_hOldMap = NULL;
783 
784  m_hCanvas.Destroy();
785  }
786  ::DeleteDC(m_hMemDC);
787  m_hMemDC = NULL;
788  }
789 
790  }
791  //----------------------------------------------------------------------------------------------
792  //----------------------------------------------------------------------------------------------
793  UINT CODStatic::GetTextFormat()
794  {
795  UINT format = DT_EDITCONTROL;
796 
797  switch (m_haHorzAlign)
798  {
800  format = DT_LEFT;
801  break;
803  format = DT_RIGHT;
804  break;
806  format = DT_CENTER;
807  break;
808  }
809 
810  switch (m_vaVertAlign)
811  {
813  format |= DT_TOP;
814  break;
816  format |= DT_VCENTER;
817  break;
819  format |= DT_BOTTOM;
820  break;
821  }
822 
823  if (m_bMultiLine == true)
824  format = format |DT_WORDBREAK ;
825  else
826  format = format | DT_SINGLELINE ;
827 
828  if (m_bEndEllipsis == true)
829  format = format | DT_END_ELLIPSIS;
830 
831  if (m_bPathEllipsis == true)
832  format = format | DT_PATH_ELLIPSIS;
833 
834  format |= DT_NOCLIP;
835 
836  return (format);
837 
838  }
839  //----------------------------------------------------------------------------------------------
840  void CODStatic::DrawEdge(CRect r)
841  {
842 
843  switch (m_EdgeStyle)
844  {
845  case CEdgeStyle::esNone:
846  break;
847  case CEdgeStyle::esLine:
848  OutlineRect(m_hMemDC, r);
849  break;
850  case CEdgeStyle::esBump:
851  ::DrawEdge(m_hMemDC, r, EDGE_BUMP,BF_RECT );
852  break;
854  ::DrawEdge(m_hMemDC, r, EDGE_ETCHED,BF_RECT );
855  break;
857  ::DrawEdge(m_hMemDC, r, EDGE_RAISED,BF_RECT );
858  break;
860  ::DrawEdge(m_hMemDC, r, EDGE_SUNKEN,BF_RECT);
861  break;
863  ::DrawEdge(m_hMemDC, r, BDR_RAISEDOUTER,BF_RECT );
864  break;
866  ::DrawEdge(m_hMemDC, r, BDR_SUNKENOUTER,BF_RECT);
867  break;
868  }
869  }
870  //----------------------------------------------------------------------------------------------
871  void CODStatic::UpdateBackBrush()
872  {
873  m_bDirtyColor = false;
874 
875  if (m_hbrBackBrush != NULL)
876  {
877  ::DeleteObject (m_hbrBackBrush);
878  m_hbrBackBrush = NULL;
879  }
880 
881  if (m_bBtnFaceBkgnd == false)
882  m_hbrBackBrush = ::CreateSolidBrush (m_clrBackColor);
883 
884  m_bUpdateContent = true;
885  }
886  //----------------------------------------------------------------------------------------------
887  //----------------------------------------------------------------------------------------------
888  //
889  // Message Handlers
890  //
891  //----------------------------------------------------------------------------------------------
892  //----------------------------------------------------------------------------------------------
894  BOOL CODStatic::OnEraseBkgnd(CDCHandle dc)
895  {
896  return(TRUE);
897  }
898  //----------------------------------------------------------------------------------------------
899  void CODStatic::OnSysColorChange()
900  {
901  if (m_bBtnFaceBkgnd == true)
902  UpdateContent();
903  }
904  //----------------------------------------------------------------------------------------------
905  void CODStatic::DrawItem(LPDRAWITEMSTRUCT lp)
906  {
907 
908  CRect rect;
909  HFONT cfont;
910  HDC dc;
911  HFONT oldfont;
912 
913  if (m_bDirtyColor == true)
914  UpdateBackBrush();
915 
916  cfont = GetFont();
917  dc = lp->hDC;
918 
919  GetClientRect(&rect);
920 
921  if ((m_hMemDC == NULL)||( m_hCanvas.IsNull()))
922  PrepareGDIStuff();
923 
924  if ((m_hMemDC != NULL)&&( ! m_hCanvas.IsNull()))
925  {
926 
927  if ((rect.Width() != m_hCanvas.GetWidth())||(rect.Height() != m_hCanvas.GetHeight()))
928  PrepareGDIStuff();
929 
930  if (m_bUpdateContent == true)
931  {
932 
933  m_bUpdateContent = false;
934 
935  if ((IsThemeNull())||(m_bUseTheme == false))
936  {
937  if (m_bBtnFaceBkgnd == false)
938  {
939  ::FillRect(m_hMemDC, rect, m_hbrBackBrush);
940  ::SetBkColor(m_hMemDC, m_clrBackColor);
941  }
942  else
943  {
944  ::FillRect(m_hMemDC, rect, ::GetSysColorBrush(COLOR_BTNFACE));
945  ::SetBkColor(m_hMemDC, ::GetSysColor(COLOR_BTNFACE));
946  }
947 
948  if (IsWindowEnabled())
949  ::SetTextColor(m_hMemDC, m_clrTextColor);
950  else
951  ::SetTextColor(m_hMemDC, ::GetSysColor(COLOR_GRAYTEXT));
952  }
953  else
954  {
955  UINT task_dialog_part = 0;
956  switch(m_ThemedBackStyle)
957  {
959  task_dialog_part = TDLG_PRIMARYPANEL;
960  break;
961 
963  task_dialog_part = TDLG_MAININSTRUCTIONPANE;
964  break;
965 
967  task_dialog_part = TDLG_CONTENTPANE;
968  break;
969 
971  task_dialog_part = TDLG_SECONDARYPANEL;
972  break;
973 
975  task_dialog_part = TDLG_CONTROLPANE;
976  break;
977  };
978  DrawThemeBackground(m_hMemDC, task_dialog_part, 0, rect);
979  }
980 
981  UINT format = GetTextFormat();
982 
983  CRect text_rect;
984  text_rect.CopyRect(&rect);
985 
986  int border_height = GetHorzEdgeHeight();
987  int border_width = GetVertEdgeWidth();
988  text_rect.DeflateRect(border_width, border_height, border_width, border_height);
989  text_rect.DeflateRect(m_iHorzMargin, m_iVertMargin, m_iHorzMargin, m_iVertMargin);
990 
991  if ((IsThemeNull())||(m_bUseTheme == false))
992  {
993  oldfont = (HFONT)::SelectObject(m_hMemDC, cfont);
994  ::DrawText(m_hMemDC, m_Text, m_Text.GetLength(), text_rect, format);
995  ::SelectObject(m_hMemDC, oldfont);
996  }
997  else
998  {
999 
1000  UINT text_part = 0;
1001  UINT text_state = 0;
1002 
1003  switch (m_ThemedTextStyle)
1004  {
1006  text_part = TEXT_MAININSTRUCTION;
1007  break;
1008 
1010  text_part = TEXT_INSTRUCTION;
1011  break;
1012 
1014  text_part = TEXT_BODYTITLE;
1015  break;
1016 
1018  text_part = TEXT_BODYTEXT;
1019  break;
1020 
1022  text_part = TEXT_SECONDARYTEXT;
1023  break;
1024 
1026  text_part = TEXT_LABEL;
1027  break;
1028 
1030  text_part = TEXT_CONTROLLABEL;
1031  text_state = TS_CONTROLLABEL_NORMAL;
1032  break;
1033 
1035  text_part = TEXT_CONTROLLABEL;
1036  text_state = TS_CONTROLLABEL_DISABLED;
1037  break;
1038  }
1039 
1040 #ifndef _UNICODE
1041  DrawThemeText(m_hMemDC, text_part ,text_state, CA2W(m_Text), m_Text.GetLength(), format, 0, text_rect);
1042 #else
1043  DrawThemeText(m_hMemDC, text_part, text_state, m_Text, m_Text.GetLength(), format, 0, text_rect);
1044 #endif
1045  }
1046 
1047  DrawEdge(rect);
1048 
1049  }
1050 
1051  ::BitBlt (dc, 0, 0,rect.Width (), rect.Height (), m_hMemDC, 0, 0, SRCCOPY);
1052 
1053  }
1054  }
1055  //----------------------------------------------------------------------------------------------
1057 };
void SetEdgeStyle(CEdgeStyle style)
The EdgeStyle state determines the type of graphic boundary indicator surrounding the control in it&#39;s...
Definition: ODStatic.cpp:477
void SetHorzTextAlignment(CHorzAlignment value)
The CHorzAlignment member variable state will result in either the DT_CENTER, DT_LEFT or DT_RIGHT fla...
Definition: ODStatic.cpp:407
void SetVerticalMargin(int margin)
Sets top and bottom text margin inside window edge. A call to UpdateContent may be required to make c...
Definition: ODStatic.cpp:508
COLORREF GetBackColor() const
Default: COLOR_BTNFACE.
Definition: ODStatic.cpp:192
COLORREF GetTextColor() const
Default: COLOR_WINDOWTEXT.
Definition: ODStatic.cpp:225
int GetVerticalMargin() const
Default: 0.
Definition: ODStatic.cpp:494
bool GetMultilineEnabled() const
Default: false.
Definition: ODStatic.cpp:291
void SetCaption(LPCTSTR text)
Set a new string to display. A call to UpdateContent may be required to make the new caption visible...
Definition: ODStatic.cpp:274
void SetMultilineEnabled(bool value)
If false, the DT_SINGLELINE flag will be included in calls to DrawText (or DrawThemeText). A call to UpdateContent may be required to make changes visible.
Definition: ODStatic.cpp:307
CEdgeStyle
Style of edge defining control boundaries.
Definition: WTL_Controls.h:37
void SetBtnFaceBkgnd(bool value)
Set or clear the UseBtnFaceBkgnd state. A call to UpdateContent may be required to make the new state...
Definition: ODStatic.cpp:175
CVertAlignment GetVertTextAlignment() const
Default: CVertAlignment::vaLeft.
Definition: ODStatic.cpp:425
CVertAlignment
Control vertical placement of text in control window.
Definition: WTL_Controls.h:47
CHorzAlignment GetHorzTextAlignment() const
Default: CHorzAlignment::haMiddle.
Definition: ODStatic.cpp:390
BOOL OutlineRect(HDC HDestDC, const RECT &RDest)
Draw a rectangular outline with the current pen.
void SetVertTextAlignment(CVertAlignment value)
The CVertAlignment member variable state will result in either the DT_BOTTOM, DT_TOP or DT_VCENTER fl...
Definition: ODStatic.cpp:442
bool GetPathEllipsisEnabled() const
Default: false.
Definition: ODStatic.cpp:357
void SetTextColor(COLORREF value)
Set a new text color. A call to UpdateContent may be required to make the new color visible...
Definition: ODStatic.cpp:240
CThemedBackgroundStyle GetThemedBackgroundStyle() const
Default: tbMainInstructionPane.
Definition: ODStatic.cpp:587
void SetThemedTextStyle(CThemedTextStyle val)
Set the ThemedTextStyle to a new value.
Definition: ODStatic.cpp:677
void SetThemedBackgroundStyle(CThemedBackgroundStyle val)
Set the ThemedBackgroundStyle to a new value.
Definition: ODStatic.cpp:620
int GetHorizontalMargin() const
Default: 0.
Definition: ODStatic.cpp:525
void UseThemedStyle(bool val)
If true, content will be painted using DrawThemeBackground and DrawThemeText, rather than the older F...
Definition: ODStatic.cpp:570
CEdgeStyle GetEdgeStyle() const
Default: CEdgeStyle::esLine.
Definition: ODStatic.cpp:459
void SetHorizontalMargin(int margin)
Sets left and right text margin inside window edge. A call to UpdateContent may be required to make c...
Definition: ODStatic.cpp:539
void UpdateContent()
Wraps calls to Invalidate and UpdateWindow, forcing a repaint, updating the back buffer and blitting ...
Definition: ODStatic.cpp:693
CHorzAlignment
Control horizontal placement of text in control window.
Definition: WTL_Controls.h:42
void SetBackColor(COLORREF value)
Set a new background color. A call to UpdateContent may be required to make the new color visible...
Definition: ODStatic.cpp:207
bool GetEndEllipsisEnabled() const
Default: false.
Definition: ODStatic.cpp:324
void SetEndEllipsisEnabled(bool value)
If true, the DT_END_ELLIPSIS flag will be included in calls to DrawText (or DrawThemeText). A call to UpdateContent may be required to make changes visible.
Definition: ODStatic.cpp:340
CThemedBackgroundStyle
The CThemedBackgroundStyle enumerants correspond to select TaskDialog Parts, as indicated below...
Definition: WTL_Controls.h:67
void UnSubclassStatic()
Un-subclass the window and release GDI resources.
Definition: ODStatic.cpp:129
void SubclassStatic(HWND hWnd)
Subclass a Static Text control.
Definition: ODStatic.cpp:86
std::basic_string< TCHAR > GetCaption() const
Default: "".
Definition: ODStatic.cpp:258
void SetPathEllipsisEnabled(bool value)
If true, the DT_PATH_ELLIPSIS flag will be included in calls to DrawText (or DrawThemeText). A call to UpdateContent may be required to make changes visible.
Definition: ODStatic.cpp:373
CThemedTextStyle GetThemedTextStyle() const
Default: ttMainInstruction.
Definition: ODStatic.cpp:637
bool GetBtnFaceBkgnd() const
Default: false.
Definition: ODStatic.cpp:152
CThemedTextStyle
The CThemedTextStyle enumerants correspond to select TextStyle Parts and States, as indicated below...
Definition: WTL_Controls.h:94
bool IsUsingThemedStyle() const
Default: false.
Definition: ODStatic.cpp:556