WTL Controls
Back to the WTL Controls Home Page.
WTL_Controls.h
Go to the documentation of this file.
1 #pragma once
2 #include "stdafx.h"
3 //--------------------------------------------------------------------------------------
4 //--------------------------------------------------------------------------------------
5 //
6 //
7 // WTL Control Library
8 // by
9 // Bright Ideas Software®
10 // Copyright © 2018 by Bright Ideas Software.
11 //
12 //
13 //
14 //--------------------------------------------------------------------------------------
15 //--------------------------------------------------------------------------------------
16 
17 
18 #include <ShellAPI.h> // required for ShellExecute call in CHyperlinkImage
19 #pragma comment(lib, "Shell32.lib")
20 
21 
22 #include <atlctrlx.h>
23 #include <string>
24 
25 #define _WTL_USE_VSSYM32
26 #define _WTL_NEW_UXTHEME
27 #include <atltheme.h>
28 
29 #include <math.h>
30 
31 
32 
33 
34 namespace BIS_WTL_CONTROLS
35 {
38 
43 
48 
68 
96 
97 };
98 
99 
100 #include "WTL_Controls_Resource.h"
101 
102  const int WM_EDITP_EDIT_END = WM_APP + 1011;
103 
105 #define DEFAULT_COMBO_ITEM_HEIGHT 24
106 
108 #include "Bevel.h"
109 #include "ColorBlob.h"
110 #include "StaticPlus.h"
111 #include "HyperlinkImage.h" // must be included after StaticPlus.h
112 #include "ODComboBox.h"
113 #include "ODStatic.h"
114 #include "EditPlus.h"
115 #include "ComboBoxPlus.h"
116 #include "ToolTipPlus.h"
117 #include "StatusBarPlus.h"
118 
119 
120 namespace BIS_WTL_CONTROLS
121 {
122 
123 #define CLR_DARK_RED 0x000080
124 #define CLR_DARK_GREEN 0x008000
125 #define CLR_DARK_YELLOW 0x008080
126 #define CLR_DARK_BLUE 0x800000
127 #define CLR_DARK_MAGENTA 0x800080
128 #define CLR_DARK_CYAN 0x808000
129 #define CLR_MONEY_GREEN 0xc0dcc0
130 #define CLR_SKY_BLUE 0xf0caa6
131 #define CLR_CYAN 0xffff00
132 #define CLR_MAGENTA 0xff00ff
133 #define CLR_BLUE 0xff0000
134 #define CLR_YELLOW 0x00ffff
135 #define CLR_GREEN 0x00ff00
136 #define CLR_RED 0x0000ff
137 #define CLR_CREAM 0xf0fbff
138 #define CLR_ORANGE 33023
139 #define CLR_PALE_RED 8421631
140 #define CLR_CHARTREUSE 65408
141 #define CLR_BROWN 4210816
142 #define CLR_PALE_YELLOW 8454143
143 #define CLR_FOREST_GREEN 4210688
144 #define CLR_VIOLET 8388672
145 #define CLR_DARK_BROWN 64
146 #define CLR_LAVENDER 16744703
147 #define CLR_GOLD 2203079
148 #define CLR_PINK 16744703
149 
150 #define CLR_BLACK 0x000000
151 #define CLR_VERY_DARK_GRAY 0x404040
152 #define CLR_DARK_GRAY 0x808080
153 #define CLR_SLATE_GRAY 0x908070
154 #define CLR_LIGHT_SLATE_GRAY 0x998877
155 #define CLR_GRAY 0xa0a0a0
156 #define CLR_SILVER 0xc0c0c0
157 #define CLR_LIGHT_GRAY 0xd3d3d3
158 #define CLR_WHITE 0xffffff
159 
160 #define CLR_PALE_GOLDENROD 0xaae8ee
161 #define CLR_GOLDENROD 0x20a52da
162 #define CLR_DARK_COLDENROD 0x0b86b8
163 #define CLR_LIGHT_STEEL_BLUE 0xdec4b0
164 
165 
166 
167 
168 
169  CString Double_To_String (double number, int precision);
170  CString Int_To_String(int value, int max_digits);
171  double Sgn(double value);
172 
173 
174  BOOL FilePresent(LPCTSTR FullFileName);
175  void GetLastErrorString();
176 
177  BOOL OutlineRect(HDC HDestDC, const RECT& RDest);
178 
179 
180  int GetCharHeight(HDC dc);
181  int GetTextLineCount(HDC dc, CString text, int width, BOOL IsEditControl = FALSE);
182  int GetTextLength(CString, HFONT font);
183 
184 
185  void DlgComboInit(int nDlgID, HWND DlgHwnd);
186 
187 };
CString Double_To_String(double number, int precision)
Convert a double to a CString, with a given number of significant digits.
int GetTextLineCount(HDC dc, CString text, int width, BOOL IsEditControl)
Returns the number of lines of text required to fit a string in a given width.
const int WM_EDITP_EDIT_END
Definition: WTL_Controls.h:102
CEdgeStyle
Style of edge defining control boundaries.
Definition: WTL_Controls.h:37
BOOL FilePresent(LPCTSTR FullFileName)
Tests for the presence of a file using SearchPath.
CVertAlignment
Control vertical placement of text in control window.
Definition: WTL_Controls.h:47
int GetTextLength(CString str, HFONT font)
Measure the length, in pixels, of a string using a given font.
BOOL OutlineRect(HDC HDestDC, const RECT &RDest)
Draw a rectangular outline with the current pen.
void DlgComboInit(int nDlgID, HWND DlgHwnd)
Load combo boxes with strings stored in a resources file.
int GetCharHeight(HDC dc)
Returns the height of a standard test string, in pixels.
double Sgn(double value)
Test the sign of a double.
void GetLastErrorString()
Show a Message Box containing human-friendly information about the last failed system API call...
CHorzAlignment
Control horizontal placement of text in control window.
Definition: WTL_Controls.h:42
CThemedBackgroundStyle
The CThemedBackgroundStyle enumerants correspond to select TaskDialog Parts, as indicated below...
Definition: WTL_Controls.h:67
CString Int_To_String(int value, int max_digits)
Convert a multi-digit integer into a CString.
CThemedTextStyle
The CThemedTextStyle enumerants correspond to select TextStyle Parts and States, as indicated below...
Definition: WTL_Controls.h:94