ReactOS 0.4.15-dev-6068-g8061a6f
fontview.c
Go to the documentation of this file.
1/*
2 * fontview
3 *
4 * fontview.c
5 *
6 * Copyright (C) 2007 Timo Kreuzer <timo <dot> kreuzer <at> reactos <dot> org>
7 * Copyright (C) 2016-2017 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 */
23
24#include "precomp.h"
25
26#include <winnls.h>
27#include <shellapi.h>
28#include <windowsx.h>
29#include <winreg.h>
30
31#include "fontview.h"
32#include "resource.h"
33
42
43static const WCHAR g_szFontViewClassName[] = L"FontViewWClass";
44
45/* GetFontResourceInfoW is undocumented */
47
52 DWORD dwStringId,
53 DWORD dwLanguageId,
56 va_list* Arguments
57)
58{
59 DWORD dwRet;
60 int len;
61 WCHAR Buffer[1000];
62
63 len = LoadStringW(hInstance, dwStringId, (LPWSTR)Buffer, 1000);
64
65 if (len)
66 {
69 dwRet = FormatMessageW(dwFlags, Buffer, 0, dwLanguageId, lpBuffer, nSize, Arguments);
70 return dwRet;
71 }
72 return 0;
73}
74
75static void
76ErrorMsgBox(HWND hParent, DWORD dwMessageId, ...)
77{
78 HLOCAL hMemCaption = NULL;
79 HLOCAL hMemText = NULL;
81
82 va_start(args, dwMessageId);
84 NULL, dwMessageId, 0, (LPWSTR)&hMemText, 0, &args);
85 va_end(args);
86
88 NULL, IDS_ERROR, 0, (LPWSTR)&hMemCaption, 0, NULL);
89
90 MessageBoxW(hParent, hMemText, hMemCaption, MB_ICONERROR);
91
92 LocalFree(hMemCaption);
93 LocalFree(hMemText);
94}
95
96int WINAPI
97wWinMain(HINSTANCE hThisInstance,
98 HINSTANCE hPrevInstance,
99 LPWSTR lpCmdLine,
100 int nCmdShow)
101{
102 int argc;
103 INT i;
104 WCHAR** argv;
107 MSG msg;
108 WNDCLASSEXW wincl;
109 LPCWSTR fileName;
110
111 switch (GetUserDefaultUILanguage())
112 {
115 break;
116
117 default:
118 break;
119 }
120
121 g_hInstance = hThisInstance;
122
123 /* Get unicode command line */
125 if (argc < 2)
126 {
127#if 0
128 WCHAR szFileName[MAX_PATH] = L"";
129 OPENFILENAMEW fontOpen;
130 WCHAR filter[MAX_PATH*2] = {0}, dialogTitle[MAX_PATH];
131
132 LoadStringW(NULL, IDS_OPEN, dialogTitle, ARRAYSIZE(dialogTitle));
134
135 /* Clears out any values of fontOpen before we use it */
136 ZeroMemory(&fontOpen, sizeof(fontOpen));
137
138 /* Sets up the open dialog box */
139 fontOpen.lStructSize = sizeof(fontOpen);
140 fontOpen.hwndOwner = NULL;
141 fontOpen.lpstrFilter = filter;
142 fontOpen.lpstrFile = szFileName;
143 fontOpen.lpstrTitle = dialogTitle;
144 fontOpen.nMaxFile = MAX_PATH;
146 fontOpen.lpstrDefExt = L"ttf";
147
148 /* Opens up the Open File dialog box in order to chose a font file. */
149 if(GetOpenFileNameW(&fontOpen))
150 {
151 fileName = fontOpen.lpstrFile;
152 g_fileName = fileName;
153 } else {
154 /* If the user decides to close out of the open dialog effectively
155 exiting the program altogether */
156 return 0;
157 }
158#endif
159 }
160 else
161 {
162 /* Try to add the font resource from command line */
163 for (i = 1; i < argc; ++i)
164 {
165 // Treat the last argument as filename
166 if (i + 1 == argc)
167 {
168 fileName = argv[i];
169 }
170 else if (argv[i][0] == '/' || argv[i][0] == '-')
171 {
172 switch (argv[i][1])
173 {
174 case 'p':
175 case 'P':
177 break;
178 case 'd':
179 case 'D':
181 break;
182 default:
183 fileName = argv[i];
184 break;
185 }
186 }
187 else
188 {
189 fileName = argv[i];
190 }
191 }
192 g_fileName = fileName;
193 }
194
196 {
198 return -1;
199 }
200
201 /* Get the font name */
202 dwSize = sizeof(g_LogFonts);
204 if (!GetFontResourceInfoW(fileName, &dwSize, g_LogFonts, 2))
205 {
206 ErrorMsgBox(0, IDS_ERROR_NOFONT, fileName);
207 return -1;
208 }
209 g_NumFonts = 0;
210 for (i = 0; i < ARRAYSIZE(g_LogFonts); ++i)
211 {
212 if (g_LogFonts[i].lfFaceName[0] == 0)
213 break;
214
215 ++g_NumFonts;
216 }
217 if (g_NumFonts == 0)
218 {
219 ErrorMsgBox(0, IDS_ERROR_NOFONT, fileName);
220 return -1;
221 }
222
223 /* get font title */
224 dwSize = sizeof(g_FontTitle);
227
228 if (!Display_InitClass(hThisInstance))
229 {
231 return -1;
232 }
233
234 /* The main window class */
235 wincl.cbSize = sizeof (WNDCLASSEXW);
236 wincl.style = CS_DBLCLKS;
237 wincl.lpfnWndProc = MainWndProc;
238 wincl.cbClsExtra = 0;
239 wincl.cbWndExtra = 0;
240 wincl.hInstance = hThisInstance;
242 wincl.hCursor = LoadCursor (NULL, IDC_ARROW);
243 wincl.hbrBackground = (HBRUSH)COLOR_BACKGROUND;
244 wincl.lpszMenuName = NULL;
247
248 /* Register the window class, and if it fails quit the program */
249 if (!RegisterClassExW (&wincl))
250 {
252 return 0;
253 }
254
255 /* The class is registered, let's create the main window */
257 0, /* Extended possibilities for variation */
258 g_szFontViewClassName, /* Classname */
259 g_FontTitle, /* Title Text */
260 WS_OVERLAPPEDWINDOW, /* default window */
261 CW_USEDEFAULT, /* Windows decides the position */
262 CW_USEDEFAULT, /* where the window ends up on the screen */
263 544, /* The programs width */
264 375, /* and height in pixels */
265 HWND_DESKTOP, /* The window is a child-window to desktop */
266 NULL, /* No menu */
267 hThisInstance, /* Program Instance handler */
268 NULL /* No Window Creation data */
269 );
270 ShowWindow(hMainWnd, nCmdShow);
271
272 /* Main message loop */
273 while (GetMessage (&msg, NULL, 0, 0))
274 {
276 continue;
279 }
280
282
283 return (int)msg.wParam;
284}
285
286static LRESULT
288{
289 WCHAR szQuit[MAX_BUTTONNAME];
290 WCHAR szPrint[MAX_BUTTONNAME];
291 WCHAR szString[MAX_STRING];
292 WCHAR szPrevious[MAX_STRING];
293 WCHAR szNext[MAX_STRING];
294 HWND hDisplay, hButtonInstall, hButtonPrint, hButtonPrev, hButtonNext;
295
296 /* create the display window */
297 hDisplay = CreateWindowExW(
298 0, /* Extended style */
299 g_szFontDisplayClassName, /* Classname */
300 L"", /* Title text */
301 WS_CHILD | WS_VSCROLL, /* Window style */
302 0, /* X-pos */
303 HEADER_SIZE, /* Y-Pos */
304 550, /* Width */
305 370-HEADER_SIZE, /* Height */
306 hwnd, /* Parent */
307 (HMENU)IDC_DISPLAY, /* Identifier */
308 g_hInstance, /* Program Instance handler */
309 NULL /* Window Creation data */
310 );
311
313 SendMessage(hDisplay, FVM_SETSTRING, 0, (LPARAM)szString);
314
315 /* Create the install button */
317 hButtonInstall = CreateWindowExW(
318 0, /* Extended style */
319 L"button", /* Classname */
320 szQuit, /* Title text */
321 WS_CHILD | WS_VISIBLE, /* Window style */
322 BUTTON_POS_X, /* X-pos */
323 BUTTON_POS_Y, /* Y-Pos */
324 BUTTON_WIDTH, /* Width */
325 BUTTON_HEIGHT, /* Height */
326 hwnd, /* Parent */
327 (HMENU)IDC_INSTALL, /* Identifier */
328 g_hInstance, /* Program Instance handler */
329 NULL /* Window Creation data */
330 );
332 EnableWindow(hButtonInstall, !g_DisableInstall);
333
334 /* Create the print button */
336 hButtonPrint = CreateWindowExW(
337 0, /* Extended style */
338 L"button", /* Classname */
339 szPrint, /* Title text */
340 WS_CHILD | WS_VISIBLE, /* Window style */
341 450, /* X-pos */
342 BUTTON_POS_Y, /* Y-Pos */
343 BUTTON_WIDTH, /* Width */
344 BUTTON_HEIGHT, /* Height */
345 hwnd, /* Parent */
346 (HMENU)IDC_PRINT, /* Identifier */
347 g_hInstance, /* Program Instance handler */
348 NULL /* Window Creation data */
349 );
351
352 /* Create the previous button */
354 hButtonPrev = CreateWindowExW(
355 0, /* Extended style */
356 L"button", /* Classname */
357 szPrevious, /* Title text */
358 WS_CHILD | WS_VISIBLE, /* Window style */
359 450, /* X-pos */
360 BUTTON_POS_Y, /* Y-Pos */
361 BUTTON_WIDTH, /* Width */
362 BUTTON_HEIGHT, /* Height */
363 hwnd, /* Parent */
364 (HMENU)IDC_PREV, /* Identifier */
365 g_hInstance, /* Program Instance handler */
366 NULL /* Window Creation data */
367 );
369
370 /* Create the next button */
372 hButtonNext = CreateWindowExW(
373 0, /* Extended style */
374 L"button", /* Classname */
375 szNext, /* Title text */
376 WS_CHILD | WS_VISIBLE, /* Window style */
377 450, /* X-pos */
378 BUTTON_POS_Y, /* Y-Pos */
379 BUTTON_WIDTH, /* Width */
380 BUTTON_HEIGHT, /* Height */
381 hwnd, /* Parent */
382 (HMENU)IDC_NEXT, /* Identifier */
383 g_hInstance, /* Program Instance handler */
384 NULL /* Window Creation data */
385 );
387
388 EnableWindow(hButtonPrev, FALSE);
389 if (g_NumFonts <= 1)
390 EnableWindow(hButtonNext, FALSE);
391
392 /* Init the display window with the font name */
393 g_FontIndex = 0;
395 ShowWindow(hDisplay, SW_SHOWNORMAL);
396
397 if (g_FontPrint)
399
400 return 0;
401}
402
403static LRESULT
405{
406 RECT rc;
407 HWND hInstall, hPrint, hPrev, hNext, hDisplay;
408 HDWP hDWP;
409
410 GetClientRect(hwnd, &rc);
411
412 hDWP = BeginDeferWindowPos(5);
413
414 hInstall = GetDlgItem(hwnd, IDC_INSTALL);
415 if (hDWP)
417
418 hPrint = GetDlgItem(hwnd, IDC_PRINT);
419 if (hDWP)
421
422 hPrev = GetDlgItem(hwnd, IDC_PREV);
423 if (hDWP)
425
426 hNext = GetDlgItem(hwnd, IDC_NEXT);
427 if (hDWP)
429
430 hDisplay = GetDlgItem(hwnd, IDC_DISPLAY);
431 if (hDWP)
432 hDWP = DeferWindowPos(hDWP, hDisplay, NULL, 0, HEADER_SIZE, rc.right, rc.bottom - HEADER_SIZE, SWP_NOZORDER);
433
434 EndDeferWindowPos(hDWP);
435
437
438 return 0;
439}
440
441static LRESULT
443{
444 HDC hDC;
445 PAINTSTRUCT ps;
446 RECT rc;
447
448 hDC = BeginPaint(hwnd, &ps);
449 GetClientRect(hwnd, &rc);
450 rc.top = HEADER_SIZE - 2;
451 rc.bottom = HEADER_SIZE;
453 EndPaint(hwnd, &ps);
454 return 0;
455}
456
457static LRESULT
459{
460 WCHAR szFullName[64];
461
462 WCHAR szSrcPath[MAX_PATH];
463 WCHAR szDestPath[MAX_PATH];
465 LONG res;
466 HKEY hKey;
467
469// MessageBoxW(hwnd, szFullName, L"Debug", MB_OK);
470
471 /* First, we have to find out if the font still exists */
473 {
474 /* Fail, if the source file does not exist */
476 return -1;
477 }
478
479 /* Build the full destination file name */
481
482 GetWindowsDirectoryW(szDestPath, MAX_PATH);
483 wcscat(szDestPath, L"\\Fonts\\");
484 wcscat(szDestPath, pszFileName);
485
486 /* Debug Message */
487// MessageBoxW(hwnd, szDestPath, L"szDestPath", MB_OK);
488// MessageBoxW(hwnd, pszFileName, L"pszFileExt", MB_OK);
489
490 /* Check if the file already exists */
492 {
493 MessageBoxW(hwnd, L"This font is already installed!", L"Already Installed", MB_OK);
494 return 0;
495 }
496
497 /* Copy the font file */
498 if (!CopyFileW(g_fileName, szDestPath, TRUE))
499 {
500 MessageBoxW(hwnd,L"Failed to copy the font file!", L"File Error", MB_OK);
501 return -1;
502 }
503
504 /* Open the fonts key */
506 L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts",
507 0,
509 &hKey);
510 if (res != ERROR_SUCCESS)
511 {
512 MessageBoxW(hwnd, L"Failed top open the fonts key!", L"Debug1", MB_OK);
513 return -1;
514 }
515
516 /* Register the font */
518 szFullName,
519 0,
520 REG_SZ,
522 (wcslen(pszFileName) + 1) * sizeof(WCHAR));
523 if (res != ERROR_SUCCESS)
524 {
525 MessageBoxW(hwnd, L"Failed to register the new font!", L"Debug2", MB_OK);
527 return -1;
528 }
529
530 /* Close the fonts key */
532
533 /* Broadcast WM_FONTCHANGE message */
535
536 /* if all of this goes correctly, message the user about success */
537 MessageBoxW(hwnd, L"Font Installation Completed.", L"Success", MB_OK);
538
539 return 0;
540}
541
542static LRESULT
544{
545 HWND hDisplay;
546 if (g_FontIndex > 0)
547 {
548 --g_FontIndex;
550 if (g_FontIndex == 0)
552
553 hDisplay = GetDlgItem(hwnd, IDC_DISPLAY);
555 InvalidateRect(hDisplay, NULL, TRUE);
556 }
557 return 0;
558}
559
560static LRESULT
562{
563 HWND hDisplay;
564 if (g_FontIndex + 1 < g_NumFonts)
565 {
566 ++g_FontIndex;
568 if (g_FontIndex == g_NumFonts - 1)
570
571 hDisplay = GetDlgItem(hwnd, IDC_DISPLAY);
573 InvalidateRect(hDisplay, NULL, TRUE);
574 }
575 return 0;
576}
577
580{
581 switch (message)
582 {
583 case WM_CREATE:
584 return MainWnd_OnCreate(hwnd);
585
586 case WM_PAINT:
587 return MainWnd_OnPaint(hwnd);
588
589 case WM_SIZE:
590 return MainWnd_OnSize(hwnd);
591
592 case WM_COMMAND:
593 switch(LOWORD(wParam))
594 {
595 case IDC_INSTALL:
596 return MainWnd_OnInstall(hwnd);
597
598 case IDC_PRINT:
599 return Display_OnPrint(hwnd);
600
601 case IDC_PREV:
602 return MainWnd_OnPrev(hwnd);
603
604 case IDC_NEXT:
605 return MainWnd_OnNext(hwnd);
606 }
607 break;
608
609 case WM_DESTROY:
610 PostQuitMessage (0); /* send a WM_QUIT to the message queue */
611 break;
612
613 default: /* for messages that we don't deal with */
615 }
616
617 return 0;
618}
619
620/* EOF */
static HDC hDC
Definition: 3dtext.c:33
static int argc
Definition: ServiceArgs.c:12
char * va_list
Definition: acmsvcex.h:78
#define va_end(ap)
Definition: acmsvcex.h:90
#define va_start(ap, A)
Definition: acmsvcex.h:91
#define msg(x)
Definition: auth_time.c:54
#define IDC_DISPLAY
Definition: resource.h:19
#define IDS_ERROR
Definition: resource.h:18
#define IDS_NEXT
Definition: resource.h:13
const WCHAR g_szFontDisplayClassName[]
Definition: display.c:34
LRESULT Display_OnPrint(HWND hwnd)
Definition: display.c:437
BOOL Display_InitClass(HINSTANCE hInstance)
Definition: display.c:55
#define FVM_SETSTRING
Definition: display.h:5
#define FVM_GETFULLNAME
Definition: display.h:6
#define FVM_SETTYPEFACE
Definition: display.h:4
#define IDS_ERROR_NOFONT
Definition: resource.h:5
#define IDS_FILTER_LIST
Definition: resource.h:7
#define IDS_PRINT
Definition: resource.h:10
#define IDS_STRING
Definition: resource.h:11
#define IDS_INSTALL
Definition: resource.h:9
#define IDS_PREVIOUS
Definition: resource.h:18
#define IDI_TT
Definition: resource.h:21
#define IDS_OPEN
Definition: resource.h:12
#define IDS_ERROR_NOCLASS
Definition: resource.h:6
#define RegCloseKey(hKey)
Definition: registry.h:47
HINSTANCE hInstance
Definition: charmap.c:19
Definition: bufpool.h:45
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define OFN_EXPLORER
Definition: commdlg.h:104
#define OFN_HIDEREADONLY
Definition: commdlg.h:107
#define OFN_FILEMUSTEXIST
Definition: commdlg.h:106
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
Definition: db.cpp:175
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define ARRAYSIZE(array)
Definition: filtermapper.c:47
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3353
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
Definition: reg.c:4897
BOOL WINAPI GetOpenFileNameW(OPENFILENAMEW *ofn)
Definition: filedlg.c:4678
#define MAX_PATH
Definition: compat.h:34
#define CALLBACK
Definition: compat.h:35
BOOL WINAPI CopyFileW(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFileName, IN BOOL bFailIfExists)
Definition: copy.c:439
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
Definition: fileinfo.c:652
DWORD WINAPI GetFullPathNameW(IN LPCWSTR lpFileName, IN DWORD nBufferLength, OUT LPWSTR lpBuffer, OUT LPWSTR *lpFilePart)
Definition: path.c:1106
UINT WINAPI GetWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2352
LPWSTR WINAPI GetCommandLineW(VOID)
Definition: proc.c:2013
DWORD WINAPI FormatMessageW(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, LPWSTR lpBuffer, DWORD nSize, __ms_va_list *args)
Definition: format_msg.c:583
#define MAX_STRING
Definition: doskey.c:43
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
INT g_FontIndex
Definition: fontview.c:35
INT g_NumFonts
Definition: fontview.c:36
static LRESULT MainWnd_OnNext(HWND hwnd)
Definition: fontview.c:561
LOGFONTW g_LogFonts[64]
Definition: fontview.c:37
static LRESULT MainWnd_OnInstall(HWND hwnd)
Definition: fontview.c:458
static void ErrorMsgBox(HWND hParent, DWORD dwMessageId,...)
Definition: fontview.c:76
int WINAPI wWinMain(HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow)
Definition: fontview.c:97
BOOL g_DisableInstall
Definition: fontview.c:41
BOOL WINAPI GetFontResourceInfoW(LPCWSTR lpFileName, DWORD *pdwBufSize, void *lpBuffer, DWORD dwType)
static LRESULT MainWnd_OnPaint(HWND hwnd)
Definition: fontview.c:442
static LRESULT MainWnd_OnCreate(HWND hwnd)
Definition: fontview.c:287
WCHAR g_FontTitle[1024]
Definition: fontview.c:39
static LRESULT MainWnd_OnPrev(HWND hwnd)
Definition: fontview.c:543
LPCWSTR g_fileName
Definition: fontview.c:38
LRESULT CALLBACK MainWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: fontview.c:579
HINSTANCE g_hInstance
Definition: fontview.c:34
DWORD FormatString(DWORD dwFlags, HINSTANCE hInstance, DWORD dwStringId, DWORD dwLanguageId, LPWSTR lpBuffer, DWORD nSize, va_list *Arguments)
Definition: fontview.c:49
BOOL g_FontPrint
Definition: fontview.c:40
static LRESULT MainWnd_OnSize(HWND hwnd)
Definition: fontview.c:404
static const WCHAR g_szFontViewClassName[]
Definition: fontview.c:43
#define BUTTON_POS_X
Definition: fontview.h:7
#define IDC_NEXT
Definition: fontview.h:17
#define HEADER_SIZE
Definition: fontview.h:6
#define BUTTON_PADDING
Definition: fontview.h:11
#define IDC_INSTALL
Definition: fontview.h:13
#define BUTTON_POS_Y
Definition: fontview.h:8
#define BUTTON_HEIGHT
Definition: fontview.h:10
#define IDC_PRINT
Definition: fontview.h:14
#define MAX_BUTTONNAME
Definition: fontview.h:4
#define BUTTON_WIDTH
Definition: fontview.h:9
#define IDC_PREV
Definition: fontview.h:16
FxAutoRegKey hKey
GLuint res
Definition: glext.h:9613
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: glext.h:7005
GLenum GLsizei len
Definition: glext.h:6722
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
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1594
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
LANGID WINAPI GetUserDefaultUILanguage(void)
Definition: lang.c:810
#define REG_SZ
Definition: layer.c:22
HWND hMainWnd
Definition: magnifier.c:32
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:56
static HDC
Definition: imagelist.c:92
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
#define argv
Definition: mplay32.c:18
unsigned int UINT
Definition: ndis.h:50
#define KEY_ALL_ACCESS
Definition: nt_native.h:1041
#define L(x)
Definition: ntvdm.h:50
#define LOWORD(l)
Definition: pedump.c:82
#define WS_CHILD
Definition: pedump.c:617
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
#define WS_VSCROLL
Definition: pedump.c:627
#define WS_VISIBLE
Definition: pedump.c:620
long LONG
Definition: pedump.c:60
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
#define MAKELANGID(p, s)
Definition: nls.h:15
#define LANG_HEBREW
Definition: nls.h:67
#define SUBLANG_DEFAULT
Definition: nls.h:168
#define args
Definition: format.c:66
LPWSTR *WINAPI CommandLineToArgvW(LPCWSTR lpCmdline, int *numargs)
Definition: shell32_main.c:80
LPCWSTR lpszClassName
Definition: winuser.h:3216
LPCWSTR lpszMenuName
Definition: winuser.h:3215
HBRUSH hbrBackground
Definition: winuser.h:3214
WNDPROC lpfnWndProc
Definition: winuser.h:3208
UINT cbSize
Definition: winuser.h:3206
int cbWndExtra
Definition: winuser.h:3210
HCURSOR hCursor
Definition: winuser.h:3213
HICON hIconSm
Definition: winuser.h:3217
HINSTANCE hInstance
Definition: winuser.h:3211
UINT style
Definition: winuser.h:3207
int cbClsExtra
Definition: winuser.h:3209
HICON hIcon
Definition: winuser.h:3212
Definition: match.c:390
Definition: tftpd.h:60
HWND hwndOwner
Definition: commdlg.h:361
DWORD Flags
Definition: commdlg.h:373
LPWSTR lpstrFile
Definition: commdlg.h:367
LPCWSTR lpstrTitle
Definition: commdlg.h:372
LPCWSTR lpstrDefExt
Definition: commdlg.h:376
DWORD lStructSize
Definition: commdlg.h:360
DWORD nMaxFile
Definition: commdlg.h:368
LPCWSTR lpstrFilter
Definition: commdlg.h:363
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
uint16_t * PWSTR
Definition: typedefs.h:56
unsigned char * LPBYTE
Definition: typedefs.h:53
int32_t INT
Definition: typedefs.h:58
WORD WORD PSZ PSZ pszFileName
Definition: vdmdbg.h:44
#define INVALID_FILE_ATTRIBUTES
Definition: vfdcmd.c:23
BOOL WINAPI SetProcessDefaultLayout(DWORD dwDefaultLayout)
Definition: window.c:1720
#define ZeroMemory
Definition: winbase.h:1670
_In_ LPCSTR lpFileName
Definition: winbase.h:3058
#define FORMAT_MESSAGE_FROM_STRING
Definition: winbase.h:421
#define GetFileAttributes
Definition: winbase.h:3686
#define GetModuleHandle
Definition: winbase.h:3698
#define FORMAT_MESSAGE_FROM_SYSTEM
Definition: winbase.h:423
#define FORMAT_MESSAGE_ALLOCATE_BUFFER
Definition: winbase.h:419
#define FORMAT_MESSAGE_FROM_HMODULE
Definition: winbase.h:422
*nSize LPSTR _Inout_ LPDWORD nSize
Definition: winbase.h:2062
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
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
HGDIOBJ WINAPI GetStockObject(_In_ int)
int WINAPI AddFontResourceW(_In_ LPCWSTR pszFilename)
BOOL WINAPI RemoveFontResourceW(_In_ LPCWSTR)
#define DEFAULT_GUI_FONT
Definition: wingdi.h:909
#define LAYOUT_RTL
Definition: wingdi.h:1371
#define GRAY_BRUSH
Definition: wingdi.h:898
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
#define SW_SHOWNORMAL
Definition: winuser.h:764
#define WM_PAINT
Definition: winuser.h:1610
BOOL WINAPI TranslateMessage(_In_ const MSG *)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define IsDialogMessage
Definition: winuser.h:5799
#define WM_CREATE
Definition: winuser.h:1598
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
#define WM_SIZE
Definition: winuser.h:1601
#define HWND_BROADCAST
Definition: winuser.h:1194
#define WM_COMMAND
Definition: winuser.h:1730
#define IDC_ARROW
Definition: winuser.h:682
#define CS_DBLCLKS
Definition: winuser.h:646
BOOL WINAPI EndDeferWindowPos(_In_ HDWP)
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define HWND_DESKTOP
Definition: winuser.h:1199
#define MB_ICONERROR
Definition: winuser.h:781
#define GetMessage
Definition: winuser.h:5780
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define WM_SETFONT
Definition: winuser.h:1640
HWND WINAPI CreateWindowExW(_In_ DWORD dwExStyle, _In_opt_ LPCWSTR lpClassName, _In_opt_ LPCWSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
#define LoadIcon
Definition: winuser.h:5803
ATOM WINAPI RegisterClassExW(_In_ CONST WNDCLASSEXW *)
#define SendMessage
Definition: winuser.h:5833
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
#define LoadCursor
Definition: winuser.h:5802
#define MB_OK
Definition: winuser.h:784
#define PostMessage
Definition: winuser.h:5822
#define CW_USEDEFAULT
Definition: winuser.h:225
struct _WNDCLASSEXW WNDCLASSEXW
HDWP WINAPI DeferWindowPos(_In_ HDWP, _In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define WM_DESTROY
Definition: winuser.h:1599
#define WM_FONTCHANGE
Definition: winuser.h:1623
#define DispatchMessage
Definition: winuser.h:5755
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define SWP_NOZORDER
Definition: winuser.h:1237
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
#define SendDlgItemMessage
Definition: winuser.h:5832
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define COLOR_BACKGROUND
Definition: winuser.h:907
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HDWP WINAPI BeginDeferWindowPos(_In_ int)
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185