ReactOS 0.4.15-dev-7897-g78dc504
3dtext.c
Go to the documentation of this file.
1/*
2 * Copyright 2000 Jeff Molofee http://nehe.gamedev.net/ (Original code)
3 * Copyright 2006 Eric Kohl
4 * Copyright 2007 Marc Piulachs (marc.piulachs@codexchange.net) - minor modifications , converted to screensaver
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#include "3dtext.h"
22
23#include <winbase.h>
24#include <wingdi.h>
25#include <winuser.h>
26#include <scrnsave.h>
27#include <math.h>
28#include <GL/glu.h>
29
30#include "resource.h"
31
32static HGLRC hRC; // Permanent Rendering Context
33static HDC hDC; // Private GDI Device Context
34
35GLuint base; // Base Display List For The Font Set
36GLfloat rot; // Used To Rotate The Text
39
40#define APPNAME _T("3DText")
41
44UINT uTimerID; // SetTimer Actual ID
45#define APP_TIMER 1 // Graphics Update Timer ID
46#define APP_TIMER_INTERVAL (USER_TIMER_MINIMUM * 5) // Graphics Update Interval
47
48// Build Our Bitmap Font
50{
51 // Address Buffer For Font Storage
52 GLYPHMETRICSFLOAT gmf[256];
53 // Windows Font Handle
54 HFONT font;
55 size_t i;
56 TCHAR c;
57 GLfloat cellOriginX = 0.0f;
58 GLfloat stringOriginX;
59 GLfloat stringExtentX = 0.0f;
60 GLfloat stringExtentY = 0.0f;
61
62 // Storage For 256 Characters
63 base = glGenLists(256);
64
65 font = CreateFont(-12,
66 0, // Width Of Font
67 0, // Angle Of Escapement
68 0, // Orientation Angle
69 FW_BOLD, // Font Weight
70 FALSE, // Italic
71 FALSE, // Underline
72 FALSE, // Strikeout
73 DEFAULT_CHARSET, // Character Set Identifier
74 OUT_TT_PRECIS, // Output Precision
75 CLIP_DEFAULT_PRECIS, // Clipping Precision
76 ANTIALIASED_QUALITY, // Output Quality
77 FF_DONTCARE|DEFAULT_PITCH, // Family And Pitch
78 _T("Tahoma")); // Font Name
79
80 // Selects The Font We Created
82
83 wglUseFontOutlines(hDC, // Select The Current DC
84 0, // Starting Character
85 255, // Number Of Display Lists To Build
86 base, // Starting Display Lists
87 0.0f, // Deviation From The True Outlines
88 0.2f, // Font Thickness In The Z Direction
89 WGL_FONT_POLYGONS, // Use Polygons, Not Lines
90 gmf); // Address Of Buffer To Receive Data
91
92 // Calculate the string extent
93 for (i = 0; i < _tcslen(m_Text); i++)
94 {
95 c = m_Text[i];
96
97 stringOriginX = cellOriginX + gmf[c].gmfptGlyphOrigin.x;
98
99 stringExtentX = stringOriginX + gmf[c].gmfBlackBoxX;
100 if (gmf[c].gmfBlackBoxY > stringExtentY)
101 stringExtentY = gmf[c].gmfBlackBoxY;
102
103 cellOriginX = cellOriginX + gmf[c].gmfCellIncX;
104 }
105
106 extentX = stringExtentX;
107 extentY = stringExtentY;
108}
109
110// Delete The Font
112{
113 // Delete all 256 characters
114 glDeleteLists(base, 256);
115}
116
117// Custom GL "Print" Routine
119{
120 // If there's no text, do nothing
121 if (text == NULL)
122 return;
123
124 // Pushes The Display List Bits
126
127 // Sets The Base Character to 32
129
130 // Draws The Display List Text
132#ifdef UNICODE
134#else
136#endif
137 text);
138
139 // Pops The Display List Bits
140 glPopAttrib();
141}
142
143// Will Be Called Right After The GL Window Is Created
145{
146 // Clear The Background Color To Black
147 glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
148
149 // Enables Clearing Of The Depth Buffer
150 glClearDepth(1.0);
151
152 // The Type Of Depth Test To Do
154
155 // Enables Depth Testing
157
158 // Enables Smooth Color Shading
160
161 // Select The Projection Matrix
163
164 // Reset The Projection Matrix
166
167 // Calculate The Aspect Ratio Of The Window
168 gluPerspective(45.0f, (GLfloat)Width / (GLfloat)Height, 0.1f, 100.0f);
169
170 // Select The Modelview Matrix
172
173 // Build The Font
174 BuildFont();
175
176 // Enable Default Light (Quick And Dirty)
178
179 // Enable Lighting
181
182 // Enable Coloring Of Material
184}
185
186// Handles Window Resizing
188{
189 // Is Window Too Small (Divide By Zero Error)
190 if (Height == 0)
191 {
192 // If So Make It One Pixel Tall
193 Height = 1;
194 }
195
196 // Reset The Current Viewport And Perspective Transformation
197 glViewport(0, 0, Width, Height);
198
199 // Select The Projection Matrix
201
202 // Reset The Projection Matrix
204
205 // Calculate The Aspect Ratio Of The Window
206 gluPerspective(45.0f, (GLfloat)Width / (GLfloat)Height, 0.1f, 100.0f);
207
208 // Select The Modelview Matrix
210}
211
212// Handles Rendering
214{
215 // Save ticks count of previous frame here
216 static DWORD dwTicks = 0;
217
218 // Clear The Screen And The Depth Buffer
220
221 // Reset The View
223
224 // Move One Unit Into The Screen
225 glTranslatef(0.0f, 0.0f, -10.0f);
226
227 // Rotate On The X Axis
228 glRotatef(rot, 1.0f, 0.0f, 0.0f);
229
230 // Rotate On The Y Axis
231 glRotatef(rot * 1.2f, 0.0f, 1.0f, 0.0f);
232
233 // Rotate On The Z Axis
234 glRotatef(rot * 1.4f, 0.0f, 0.0f, 1.0f);
235
236 // Move to the Left and Down before drawing
237 glTranslatef(-(extentX / 2.0f),
238 -(extentY / 2.0f),
239 0.0f);
240
241 // Pulsing Colors Based On The Rotation
242 glColor3f((1.0f * (GLfloat)(cos(rot / 20.0f))),
243 (1.0f * (GLfloat)(sin(rot / 25.0f))),
244 (1.0f - 0.5f * (GLfloat)(cos(rot / 17.0f))));
245
246 // Print GL Text To The Screen
248
249 // Make The Text Blue
250 glColor3f(0.0f, 0.0f, 1.0f);
251
252 // Increase The Rotation Variable
253 if(dwTicks)
254 rot += (GetTickCount() - dwTicks) / 20.0f;
255 dwTicks = GetTickCount();
256}
257
260{
261 RECT Screen; // Used Later On To Get The Size Of The Window
262 GLuint PixelFormat; // Pixel Format Storage
263 static PIXELFORMATDESCRIPTOR pfd= // Pixel Format Descriptor
264 {
265 sizeof(PIXELFORMATDESCRIPTOR), // Size Of This Pixel Format Descriptor
266 1, // Version Number (?)
267 PFD_DRAW_TO_WINDOW | // Format Must Support Window
268 PFD_SUPPORT_OPENGL | // Format Must Support OpenGL
269 PFD_DOUBLEBUFFER, // Must Support Double Buffering
270 PFD_TYPE_RGBA, // Request An RGBA Format
271 16, // Select A 16Bit Color Depth
272 0, 0, 0, 0, 0, 0, // Color Bits Ignored (?)
273 0, // No Alpha Buffer
274 0, // Shift Bit Ignored (?)
275 0, // No Accumulation Buffer
276 0, 0, 0, 0, // Accumulation Bits Ignored (?)
277 16, // 16Bit Z-Buffer (Depth Buffer)
278 0, // No Stencil Buffer
279 0, // No Auxiliary Buffer (?)
280 PFD_MAIN_PLANE, // Main Drawing Layer
281 0, // Reserved (?)
282 0, 0, 0 // Layer Masks Ignored (?)
283 };
284
285 switch (message)
286 {
287 case WM_CREATE:
288 LoadSettings();
289
290 // Gets A Device Context For The Window
291 hDC = GetDC(hWnd);
292
293 // Finds The Closest Match To The Pixel Format We Set Above
295
296 // No Matching Pixel Format?
297 if (!PixelFormat)
298 {
299 MessageBox(0, _TEXT("Can't Find A Suitable PixelFormat."), _TEXT("Error"),MB_OK | MB_ICONERROR);
300
301 // This Sends A 'Message' Telling The Program To Quit
303 break;
304 }
305
306 // Can We Set The Pixel Mode?
308 {
309 MessageBox(0, _TEXT("Can't Set The PixelFormat."), _TEXT("Error"), MB_OK | MB_ICONERROR);
310
311 // This Sends A 'Message' Telling The Program To Quit
313 break;
314 }
315
316 // Grab A Rendering Context
318
319 // Did We Get One?
320 if (!hRC)
321 {
322 MessageBox(0, _TEXT("Can't Create A GL Rendering Context."), _TEXT("Error"), MB_OK | MB_ICONERROR);
323
324 // This Sends A 'Message' Telling The Program To Quit
326 break;
327 }
328
329 // Can We Make The RC Active?
330 if (!wglMakeCurrent(hDC, hRC))
331 {
332 MessageBox(0, _TEXT("Can't Activate GLRC."), _TEXT("Error"), MB_OK | MB_ICONERROR);
333
334 // This Sends A 'Message' Telling The Program To Quit
336 break;
337 }
338
339 // Grab Screen Info For The Current Window
341
342 // Initialize The GL Screen Using Screen Info
343 InitGL(Screen.right, Screen.bottom);
344
345 // Create Graphics update timer
347 break;
348
349 case WM_DESTROY:
350 // Disable Fullscreen Mode
351 ChangeDisplaySettings(NULL, 0);
352
353 // Delete the Update Timer
355
356 // Deletes The Font Display List
357 KillFont();
358
359 // Make The DC Current
361
362 // Kill The RC
364
365 // Free The DC
367 break;
368
369 case WM_PAINT:
370 DrawGLScene();
372 // Mark this window as updated, so the OS won't ask us to update it again.
374 break;
375
376 case WM_SIZE: // Resizing The Screen
377 // Resize To The New Window Size
379 break;
380
381 case WM_TIMER:
382 // Used to update graphic based on timer udpate interval
384 break;
385
386 default:
387 // Pass Windows Messages to the default screensaver window procedure
389 }
390
391 return 0;
392}
393
394//
395// Dialogbox procedure for Configuration window
396//
398{
399 switch (uMsg)
400 {
401 case WM_INITDIALOG:
402 LoadSettings();
404 return TRUE;
405
406 case WM_COMMAND:
407 switch (LOWORD(wParam))
408 {
409 case IDOK:
411 SaveSettings();
412
413 /* Fall through */
414
415 case IDCANCEL:
416 EndDialog(hDlg, IDCANCEL);
417 break;
418 }
419 return FALSE;
420
421 case WM_CLOSE:
422 EndDialog(hDlg, 0);
423 break;
424
425 default:
426 return FALSE;
427 }
428
429 return TRUE;
430}
431
433{
434 return TRUE;
435}
GLvoid InitGL(GLsizei Width, GLsizei Height)
Definition: 3dtext.c:144
GLvoid ReSizeGLScene(GLsizei Width, GLsizei Height)
Definition: 3dtext.c:187
GLvoid KillFont(GLvoid)
Definition: 3dtext.c:111
GLvoid glPrint(LPTSTR text)
Definition: 3dtext.c:118
#define APP_TIMER_INTERVAL
Definition: 3dtext.c:46
GLfloat extentX
Definition: 3dtext.c:37
HINSTANCE hInstance
Definition: 3dtext.c:42
static HDC hDC
Definition: 3dtext.c:33
static HGLRC hRC
Definition: 3dtext.c:32
GLvoid DrawGLScene(GLvoid)
Definition: 3dtext.c:213
GLfloat extentY
Definition: 3dtext.c:38
#define APP_TIMER
Definition: 3dtext.c:45
GLvoid BuildFont(GLvoid)
Definition: 3dtext.c:49
BOOL fullscreen
Definition: 3dtext.c:43
UINT uTimerID
Definition: 3dtext.c:44
LRESULT CALLBACK ScreenSaverProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: 3dtext.c:259
GLfloat rot
Definition: 3dtext.c:36
BOOL CALLBACK ScreenSaverConfigureDialog(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: 3dtext.c:397
GLuint base
Definition: 3dtext.c:35
BOOL WINAPI RegisterDialogClasses(HANDLE hInst)
Definition: 3dtext.c:432
TCHAR m_Text[MAX_PATH]
Definition: settings.c:25
_STLP_DECLSPEC complex< float > _STLP_CALL cos(const complex< float > &)
_STLP_DECLSPEC complex< float > _STLP_CALL sin(const complex< float > &)
void SaveSettings(void)
Definition: settings.c:115
void LoadSettings(void)
Definition: settings.c:53
HWND hWnd
Definition: settings.c:17
#define IDC_MESSAGE_TEXT
Definition: resource.h:5
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
@ Screen
Definition: console.h:34
#define MAX_PATH
Definition: compat.h:34
#define CALLBACK
Definition: compat.h:35
DWORD WINAPI GetTickCount(VOID)
Definition: time.c:455
const WCHAR * text
Definition: package.c:1799
HINSTANCE hInst
Definition: dxdiag.c:13
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
INT PixelFormat
GLAPI void GLAPIENTRY glClearDepth(GLclampd depth)
GLAPI void GLAPIENTRY glTranslatef(GLfloat x, GLfloat y, GLfloat z)
GLAPI void GLAPIENTRY glDepthFunc(GLenum func)
#define GL_LESS
Definition: gl.h:294
GLAPI void GLAPIENTRY glEnable(GLenum cap)
#define GL_LIST_BIT
Definition: gl.h:719
float GLfloat
Definition: gl.h:161
#define GL_UNSIGNED_SHORT
Definition: gl.h:180
#define GL_DEPTH_TEST
Definition: gl.h:301
#define GL_SMOOTH
Definition: gl.h:339
GLAPI void GLAPIENTRY glLoadIdentity(void)
unsigned int GLuint
Definition: gl.h:159
GLAPI GLuint GLAPIENTRY glGenLists(GLsizei range)
GLAPI void GLAPIENTRY glDeleteLists(GLuint list, GLsizei range)
#define GL_UNSIGNED_BYTE
Definition: gl.h:178
#define GL_PROJECTION
Definition: gl.h:246
#define GL_MODELVIEW
Definition: gl.h:245
GLAPI void GLAPIENTRY glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
#define GL_COLOR_BUFFER_BIT
Definition: gl.h:716
#define GL_COLOR_MATERIAL
Definition: gl.h:340
GLAPI void GLAPIENTRY glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
GLAPI void GLAPIENTRY glCallLists(GLsizei n, GLenum type, const GLvoid *lists)
int GLsizei
Definition: gl.h:160
GLAPI void GLAPIENTRY glPopAttrib(void)
GLAPI void GLAPIENTRY glListBase(GLuint base)
GLAPI void GLAPIENTRY glColor3f(GLfloat red, GLfloat green, GLfloat blue)
GLAPI void GLAPIENTRY glPushAttrib(GLbitfield mask)
#define GL_DEPTH_BUFFER_BIT
Definition: gl.h:710
GLAPI void GLAPIENTRY glMatrixMode(GLenum mode)
GLAPI void GLAPIENTRY glShadeModel(GLenum mode)
GLAPI void GLAPIENTRY glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
#define GL_LIGHT0
Definition: gl.h:311
#define GL_LIGHTING
Definition: gl.h:310
GLAPI void GLAPIENTRY glClear(GLbitfield mask)
const GLubyte * c
Definition: glext.h:8905
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define gluPerspective
Definition: glu_mangle.h:28
#define _TEXT(x)
Definition: tchar.h:1535
#define c
Definition: ke_i.h:80
static HDC
Definition: imagelist.c:92
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
wchar_t UNICODE
Definition: ms-dtyp.idl:111
Definition: mk_font.cpp:20
unsigned int UINT
Definition: ndis.h:50
static HGLRC(WINAPI *pwglCreateContextAttribsARB)(HDC hDC
#define LOWORD(l)
Definition: pedump.c:82
LRESULT WINAPI DefScreenSaverProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: scrnsave.c:92
static PIXELFORMATDESCRIPTOR pfd
Definition: ssstars.c:67
FLOAT gmfBlackBoxX
Definition: wingdi.h:2726
POINTFLOAT gmfptGlyphOrigin
Definition: wingdi.h:2728
FLOAT gmfBlackBoxY
Definition: wingdi.h:2727
FLOAT x
Definition: wingdi.h:2722
Definition: tftpd.h:60
#define HIWORD(l)
Definition: typedefs.h:247
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
Definition: font.h:89
_In_ HFONT _Out_ PUINT Height
Definition: font.h:88
#define _T(x)
Definition: vfdio.h:22
BOOL WINAPI wglDeleteContext(HGLRC hglrc)
Definition: wgl.c:514
HGLRC WINAPI wglCreateContext(HDC hdc)
Definition: wgl.c:383
BOOL WINAPI wglMakeCurrent(HDC hdc, HGLRC hglrc)
Definition: wgl.c:650
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
#define WINAPI
Definition: msvc.h:6
#define DEFAULT_PITCH
Definition: wingdi.h:443
int WINAPI ChoosePixelFormat(_In_ HDC hdc, _In_ const PIXELFORMATDESCRIPTOR *ppfd)
#define ANTIALIASED_QUALITY
Definition: wingdi.h:440
BOOL WINAPI SetPixelFormat(_In_ HDC, _In_ int, _In_ const PIXELFORMATDESCRIPTOR *)
#define WGL_FONT_POLYGONS
Definition: wingdi.h:1325
#define PFD_SUPPORT_OPENGL
Definition: wingdi.h:306
#define FW_BOLD
Definition: wingdi.h:378
#define FF_DONTCARE
Definition: wingdi.h:448
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1539
#define DEFAULT_CHARSET
Definition: wingdi.h:384
struct tagPIXELFORMATDESCRIPTOR PIXELFORMATDESCRIPTOR
BOOL WINAPI SwapBuffers(HDC)
Definition: wingl.c:187
#define wglUseFontOutlines
Definition: wingdi.h:4486
#define CreateFont
Definition: wingdi.h:4443
#define PFD_DRAW_TO_WINDOW
Definition: wingdi.h:303
#define OUT_TT_PRECIS
Definition: wingdi.h:419
#define CLIP_DEFAULT_PRECIS
Definition: wingdi.h:426
#define PFD_MAIN_PLANE
Definition: wingdi.h:298
#define PFD_TYPE_RGBA
Definition: wingdi.h:296
#define PFD_DOUBLEBUFFER
Definition: wingdi.h:301
#define WM_PAINT
Definition: winuser.h:1620
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define WM_CLOSE
Definition: winuser.h:1621
#define IDCANCEL
Definition: winuser.h:831
#define WM_CREATE
Definition: winuser.h:1608
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
#define WM_SIZE
Definition: winuser.h:1611
#define GetDlgItemText
Definition: winuser.h:5785
BOOL WINAPI ValidateRect(_In_opt_ HWND, _In_opt_ LPCRECT)
#define WM_COMMAND
Definition: winuser.h:1740
#define WM_INITDIALOG
Definition: winuser.h:1739
#define IDOK
Definition: winuser.h:830
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
#define MB_ICONERROR
Definition: winuser.h:787
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define WM_TIMER
Definition: winuser.h:1742
HDC WINAPI GetDC(_In_opt_ HWND)
#define MB_OK
Definition: winuser.h:790
#define MessageBox
Definition: winuser.h:5822
#define WM_DESTROY
Definition: winuser.h:1609
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
#define SetDlgItemText
Definition: winuser.h:5849
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
char TCHAR
Definition: xmlstorage.h:189
CHAR * LPTSTR
Definition: xmlstorage.h:192
#define _tcslen
Definition: xmlstorage.h:198