ReactOS 0.4.15-dev-7942-gd23573b
console.c
Go to the documentation of this file.
1/*
2 * ReactOS Management Console
3 * Copyright (C) 2006 - 2007 Thomas Weidenmueller
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20#include "precomp.h"
21#include <shellapi.h>
22#include <stdlib.h>
23#include <strsafe.h>
24
25#include "resource.h"
26
27#define NDEBUG
28#include <debug.h>
29
31{
34
38 union
39 {
41 struct
42 {
44 };
45 };
47
49{
54
55static const TCHAR szMMCMainFrame[] = TEXT("MMCMainFrame");
56static const TCHAR szMMCChildFrm[] = TEXT("MMCChildFrm");
57
59
62{
63 HWND hWndMDIChild;
64
65 hWndMDIChild = (HWND)SendMessageW(hwndMDIClient, WM_MDIGETACTIVE, 0, 0);
66 if (hWndMDIChild == NULL)
67 return NULL;
68
69 return (PCONSOLE_CHILDFRM_WND)GetWindowLongPtr(hWndMDIChild, 0);
70}
71
72
73static LPTSTR
75{
77
80 &lpTitle,
81 ++NewConsoleCount) == 0)
82 {
83 lpTitle = NULL;
84 }
85
86 return lpTitle;
87}
88
89HWND
92{
95
96 mcs.szTitle = CreateNewConsoleTitle();
97 mcs.szClass = szMMCChildFrm;
98 mcs.hOwner = GetModuleHandle(NULL);
99 mcs.x = mcs.cx = CW_USEDEFAULT;
100 mcs.y = mcs.cy = CW_USEDEFAULT;
101 mcs.style = MDIS_ALLCHILDSTYLES;
102
104 if (hChild)
105 {
106 Info->nConsoleCount++;
107 }
108
109 return hChild;
110}
111
112
113static LRESULT
116{
119 LPCTSTR lpFileName = (LPCTSTR)(((LPCREATESTRUCT)lParam)->lpCreateParams);
120
123 sizeof(CONSOLE_MAINFRAME_WND));
124 if (Info == NULL)
125 return -1;
126
127 Info->hwnd = hwnd;
128
130 0,
131 (LONG_PTR)Info);
132
133 Info->hMenuConsoleSmall = LoadMenu(hAppInstance,
135
136 Info->hMenuConsoleLarge = LoadMenu(hAppInstance,
138
139 if (lpFileName == NULL)
140 {
141 /* FIXME */
142 Info->AppAuthorMode = TRUE;
143// Info->lpConsoleTitle = TEXT("ReactOS Management Console");
144 }
145 else
146 {
147 Info->AppAuthorMode = TRUE;
148// Info->lpConsoleTitle = CreateNewConsoleTitle();
149 }
150
151 SetMenu(Info->hwnd,
152 Info->hMenuConsoleSmall);
153
154 SetWindowText(Info->hwnd, TEXT("ReactOS Management Console"));
155
156 ccs.hWindowMenu = GetSubMenu(Info->hMenuConsoleLarge, 1);
158
159 /* Create the MDI client window */
161 L"MDICLIENT",
162 (LPCTSTR)NULL,
168 hwnd,
169 (HMENU)0xCAC,
171 (LPVOID)&ccs);
172
173 ShowWindow(Info->hwndMDIClient, SW_SHOW);
174
175 return 0;
176}
177
178
179static VOID
182 PWSTR pFileName)
183{
184 DPRINT1("SetFileName(&p \'%S\')\n", Info, pFileName);
185
186 if (Info->pFileName != NULL)
187 {
188 HeapFree(GetProcessHeap(), 0, Info->pFileName);
189 Info->pFileName = NULL;
190 }
191
192 if (pFileName != NULL)
193 {
194 Info->pFileName = HeapAlloc(GetProcessHeap(),
195 0,
196 (_tcslen(pFileName) + 1) * sizeof(TCHAR));
197 if (Info->pFileName != NULL)
198 _tcscpy(Info->pFileName, pFileName);
199 }
200}
201
202static BOOL
204 HWND hWnd,
205 PCONSOLE_CHILDFRM_WND pChildInfo);
206
207static BOOL
209 HWND hWnd,
210 PCONSOLE_CHILDFRM_WND pChildInfo)
211{
212 DPRINT1("pChildInfo %p\n", pChildInfo);
213
214 DPRINT1("FileName %S\n", pChildInfo->pFileName);
215
216 if (pChildInfo->pFileName == NULL)
217 return DoSaveFileAs(hWnd, pChildInfo);
218
219 /* FIXME: Save the console here! */
220
221 return TRUE;
222}
223
224static BOOL
226 HWND hWnd,
227 PCONSOLE_CHILDFRM_WND pChildInfo)
228{
229 OPENFILENAME saveas;
231
232 DPRINT1("pChildInfo %p\n", pChildInfo);
233 DPRINT1("FileName %S\n", pChildInfo->pFileName);
234
235 ZeroMemory(&saveas, sizeof(saveas));
236
237 if (pChildInfo->pFileName != NULL)
238 {
239 StringCbCopy(szPath, sizeof(szPath), pChildInfo->pFileName);
240 }
241 else
242 {
243 GetWindowText(pChildInfo->hwnd, szPath, _countof(szPath));
244 StringCbCat(szPath, sizeof(szPath), TEXT(".msc"));
245 }
246
247 saveas.lStructSize = sizeof(OPENFILENAME);
248 saveas.hwndOwner = hWnd;
249 saveas.hInstance = hAppInstance;
250 saveas.lpstrFilter = L"MSC Files\0*.msc\0";
251 saveas.lpstrFile = szPath;
252 saveas.nMaxFile = MAX_PATH;
254 saveas.lpstrDefExt = L"msc";
255
256 if (GetSaveFileName(&saveas))
257 {
258 /* HACK: Because in ROS, Save-As boxes don't check the validity
259 * of file names and thus, here, szPath can be invalid !! We only
260 * see its validity when we call DoSaveFile()... */
261 SetFileName(pChildInfo, szPath);
262
263 if (DoSaveFile(hWnd, pChildInfo))
264 {
265// UpdateWindowCaption();
266 return TRUE;
267 }
268 else
269 {
270 SetFileName(pChildInfo, NULL);
271 return FALSE;
272 }
273 }
274 else
275 {
276 return FALSE;
277 }
278}
279
280static BOOL
282 HWND hWnd)
283{
284 PCONSOLE_CHILDFRM_WND pChildInfo;
285
286 pChildInfo = GetActiveChildInfo();
287 if (pChildInfo == NULL)
288 return FALSE;
289
290 return DoSaveFile(hWnd, pChildInfo);
291}
292
293
294static BOOL
296 HWND hWnd)
297{
298 PCONSOLE_CHILDFRM_WND pChildInfo;
299
300 pChildInfo = GetActiveChildInfo();
301 if (pChildInfo == NULL)
302 return FALSE;
303
304 return DoSaveFileAs(hWnd, pChildInfo);
305}
306
307static VOID
309 UINT uMsg,
312{
314 HWND hChild;
316
318
319 switch (LOWORD(wParam))
320 {
321 case IDM_FILE_NEW:
323 SetMenu(Info->hwnd,
324 Info->hMenuConsoleLarge);
325 break;
326
327 case IDM_FILE_SAVE:
329 break;
330
331 case IDM_FILE_SAVEAS:
333 break;
334
335 case IDM_FILE_EXIT:
336 PostMessage(hwnd, WM_CLOSE, 0, 0);
337 break;
338
339 case IDM_HELP_ABOUT:
341 {
345 }
346 break;
347
348 default:
350 {
352 }
353 else
354 {
356 if (hChild)
357 {
359 }
360 }
361 break;
362 }
363}
364
365
366static VOID
368 WORD cx,
369 WORD cy)
370{
371 RECT rcClient; //, rcTool, rcStatus;
372// int lvHeight, iToolHeight, iStatusHeight;
373
374 /* Size toolbar and get height */
375// SendMessage(Info->hTool, TB_AUTOSIZE, 0, 0);
376// GetWindowRect(Info->hTool, &rcTool);
377// iToolHeight = rcTool.bottom - rcTool.top;
378
379 /* Size status bar and get height */
380// SendMessage(Info->hStatus, WM_SIZE, 0, 0);
381// GetWindowRect(Info->hStatus, &rcStatus);
382// iStatusHeight = rcStatus.bottom - rcStatus.top;
383
384 /* Calculate remaining height and size list view */
385 GetClientRect(hMainWnd, &rcClient);
386// lvHeight = rcClient.bottom - iToolHeight - iStatusHeight;
387 SetWindowPos(hwndMDIClient, //Info->hTreeView,
388 NULL,
389 0,
390 0, //iToolHeight,
391 rcClient.right,
392 rcClient.bottom, //lvHeight,
394}
395
396
397static LRESULT CALLBACK
399 IN UINT uMsg,
402{
404
406 0);
407
408 switch (uMsg)
409 {
410 case WM_CREATE:
411 return FrameOnCreate(hwnd,
412 lParam);
413
414 case WM_COMMAND:
416 uMsg,
417 wParam,
418 lParam);
419 break;
420
421 case WM_SIZE:
423 LOWORD(lParam),
424 HIWORD(lParam));
425 break;
426
427 case WM_CLOSE:
429 break;
430
431 case WM_DESTROY:
432 if (Info != NULL)
433 {
434 SetMenu(Info->hwnd,
435 NULL);
436
437 if (Info->hMenuConsoleSmall != NULL)
438 {
439 DestroyMenu(Info->hMenuConsoleSmall);
440 Info->hMenuConsoleSmall = NULL;
441 }
442
443 if (Info->hMenuConsoleLarge != NULL)
444 {
445 DestroyMenu(Info->hMenuConsoleLarge);
446 Info->hMenuConsoleLarge = NULL;
447 }
448
450 0,
451 Info);
452 }
453
455 break;
456
458 Info->nConsoleCount--;
459 if (Info->nConsoleCount == 0)
460 {
461 SetMenu(Info->hwnd,
462 Info->hMenuConsoleSmall);
463 }
464 break;
465
466 default:
467 return DefFrameProc(hwnd,
469 uMsg,
470 wParam,
471 lParam);
472 }
473
474 return 0;
475}
476
477
478static LRESULT CALLBACK
480 IN UINT uMsg,
483{
485
487 0);
488
489 switch (uMsg)
490 {
491 case WM_CREATE:
494 sizeof(CONSOLE_CHILDFRM_WND));
495 if (Info != NULL)
496 {
497 Info->hwnd = hwnd;
498
500 0,
501 (LONG_PTR)Info);
502 }
503 break;
504
505 case WM_DESTROY:
506 if (Info != NULL)
507 {
508 if (Info->pFileName)
509 HeapFree(hAppHeap, 0, Info->pFileName);
510
512 }
513
515 break;
516
517 default:
518 return DefMDIChildProc(hwnd, uMsg, wParam, lParam);
519 }
520
521 return 0;
522}
523
524
525BOOL
527{
528 WNDCLASSEX wc = {0};
529 BOOL Ret;
530
531 /* Register the MMCMainFrame window class */
532 wc.cbSize = sizeof(WNDCLASSEX);
533 wc.style = 0;
535 wc.cbClsExtra = 0;
542 wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
543 wc.lpszMenuName = NULL;
545
546 Ret = (RegisterClassEx(&wc) != (ATOM)0);
547
548 if (Ret)
549 {
550 /* Register the MMCChildFrm window class */
551 wc.cbSize = sizeof(WNDCLASSEX);
554 wc.cbClsExtra = 0;
559 wc.hbrBackground = (HBRUSH)(COLOR_3DFACE+1);
560 wc.lpszMenuName = NULL;
563
564 Ret = (RegisterClassEx(&wc) != (ATOM)0);
565 if (!Ret)
566 {
569 }
570 }
571
572 return Ret;
573}
574
575VOID
577{
582}
583
584HWND
586 int nCmdShow)
587{
588 HWND hWndConsole;
590
591 hWndConsole = CreateWindowEx(WS_EX_WINDOWEDGE,
593 NULL,
599 NULL,
600 NULL,
602 (PVOID)FileName);
603
604 if (hWndConsole != NULL)
605 {
606 ShowWindow(hWndConsole, nCmdShow);
607 }
608
609 return hWndConsole;
610}
static struct myctx * mcs
Definition: adnstest.c:53
#define IDM_HELP_ABOUT
Definition: resource.h:387
HWND hWnd
Definition: settings.c:17
static VOID FrameOnCommand(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: console.c:308
static BOOL DoSaveFile(HWND hWnd, PCONSOLE_CHILDFRM_WND pChildInfo)
Definition: console.c:208
static LRESULT CALLBACK ConsoleChildFrmProc(IN HWND hwnd, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
Definition: console.c:479
struct _CONSOLE_MAINFRAME_WND * PCONSOLE_MAINFRAME_WND
static BOOL FrameOnSaveAs(HWND hWnd)
Definition: console.c:295
static const TCHAR szMMCChildFrm[]
Definition: console.c:56
struct _CONSOLE_MAINFRAME_WND CONSOLE_MAINFRAME_WND
static VOID SetFileName(PCONSOLE_CHILDFRM_WND Info, PWSTR pFileName)
Definition: console.c:180
static ULONG NewConsoleCount
Definition: console.c:58
static LRESULT CALLBACK ConsoleMainFrameWndProc(IN HWND hwnd, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
Definition: console.c:398
PCONSOLE_CHILDFRM_WND GetActiveChildInfo(VOID)
Definition: console.c:61
HWND CreateNewMDIChild(PCONSOLE_MAINFRAME_WND Info, HWND hwndMDIClient)
Definition: console.c:90
struct _CONSOLE_CHILDFRM_WND * PCONSOLE_CHILDFRM_WND
static VOID FrameOnSize(HWND hMainWnd, WORD cx, WORD cy)
Definition: console.c:367
struct _CONSOLE_CHILDFRM_WND CONSOLE_CHILDFRM_WND
VOID UnregisterMMCWndClasses(VOID)
Definition: console.c:576
static BOOL FrameOnSave(HWND hWnd)
Definition: console.c:281
static LPTSTR CreateNewConsoleTitle(VOID)
Definition: console.c:74
static BOOL DoSaveFileAs(HWND hWnd, PCONSOLE_CHILDFRM_WND pChildInfo)
Definition: console.c:225
HWND CreateConsoleWindow(IN LPCTSTR lpFileName OPTIONAL, int nCmdShow)
Definition: console.c:585
static LRESULT FrameOnCreate(HWND hwnd, LPARAM lParam)
Definition: console.c:114
BOOL RegisterMMCWndClasses(VOID)
Definition: console.c:526
static const TCHAR szMMCMainFrame[]
Definition: console.c:55
INT AllocAndLoadString(OUT LPTSTR *lpTarget, IN HINSTANCE hInst, IN UINT uID)
Definition: misc.c:59
DWORD LoadAndFormatString(IN HINSTANCE hInstance, IN UINT uID, OUT LPTSTR *lpTarget,...)
Definition: misc.c:85
HWND hwndMDIClient
Definition: mmc.c:26
HANDLE hAppHeap
Definition: mmc.c:24
HINSTANCE hAppInstance
Definition: mmc.c:23
HWND hwndMainConsole
Definition: mmc.c:25
#define WM_USER_CLOSE_CHILD
Definition: precomp.h:14
#define IDM_CONSOLE_SMALL
Definition: resource.h:8
#define IDI_MAINAPP
Definition: resource.h:6
#define IDM_FILE_NEW
Definition: resource.h:11
#define IDM_FILE_SAVE
Definition: resource.h:13
#define IDM_MDI_FIRSTCHILD
Definition: resource.h:19
#define IDM_CONSOLE_LARGE
Definition: resource.h:9
#define IDS_CONSOLETITLE
Definition: resource.h:4
#define IDM_FILE_SAVEAS
Definition: resource.h:14
#define IDM_FILE_EXIT
Definition: resource.h:15
#define IDS_APPTITLE
Definition: resource.h:3
#define DPRINT1
Definition: precomp.h:8
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define OFN_OVERWRITEPROMPT
Definition: commdlg.h:116
#define GetSaveFileName
Definition: commdlg.h:666
#define OFN_EXPLORER
Definition: commdlg.h:104
#define OFN_HIDEREADONLY
Definition: commdlg.h:107
#define OFN_PATHMUSTEXIST
Definition: commdlg.h:117
OPENFILENAMEA OPENFILENAME
Definition: commdlg.h:657
TCHAR lpTitle[80]
Definition: ctm.c:69
WORD ATOM
Definition: dimm.idl:113
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define GetProcessHeap()
Definition: compat.h:736
HANDLE HWND
Definition: compat.h:19
#define HeapAlloc
Definition: compat.h:733
#define MAX_PATH
Definition: compat.h:34
#define HeapFree(x, y, z)
Definition: compat.h:735
#define CALLBACK
Definition: compat.h:35
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1594
#define _tcscpy
Definition: tchar.h:623
#define TEXT(s)
Definition: k32.h:26
HWND hMainWnd
Definition: magnifier.c:32
LPCWSTR szPath
Definition: env.c:37
static HTREEITEM hChild
Definition: treeview.c:381
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned int UINT
Definition: ndis.h:50
#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_BORDER
Definition: pedump.c:625
#define WS_VSCROLL
Definition: pedump.c:627
#define WS_VISIBLE
Definition: pedump.c:620
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define WS_HSCROLL
Definition: pedump.c:628
#define WS_CLIPCHILDREN
Definition: pedump.c:619
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:586
_Out_opt_ int * cx
Definition: commctrl.h:585
#define DefMDIChildProc
Definition: ros2win.h:33
#define DefFrameProc
Definition: ros2win.h:32
#define ShellAbout
Definition: shellapi.h:692
#define _countof(array)
Definition: sndvol32.h:68
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
#define StringCbCat
Definition: strsafe.h:334
#define StringCbCopy
Definition: strsafe.h:155
PCONSOLE_MAINFRAME_WND MainFrame
Definition: console.c:51
int cbClsExtra
Definition: winuser.h:3204
HINSTANCE hInstance
Definition: winuser.h:3206
HCURSOR hCursor
Definition: winuser.h:3208
LPCSTR lpszMenuName
Definition: winuser.h:3210
HICON hIconSm
Definition: winuser.h:3212
UINT style
Definition: winuser.h:3202
int cbWndExtra
Definition: winuser.h:3205
UINT cbSize
Definition: winuser.h:3201
WNDPROC lpfnWndProc
Definition: winuser.h:3203
LPCSTR lpszClassName
Definition: winuser.h:3211
HICON hIcon
Definition: winuser.h:3207
HBRUSH hbrBackground
Definition: winuser.h:3209
LPCSTR lpstrDefExt
Definition: commdlg.h:345
HWND hwndOwner
Definition: commdlg.h:330
HINSTANCE hInstance
Definition: commdlg.h:331
LPSTR lpstrFile
Definition: commdlg.h:336
DWORD Flags
Definition: commdlg.h:342
DWORD lStructSize
Definition: commdlg.h:329
LPCSTR lpstrFilter
Definition: commdlg.h:332
DWORD nMaxFile
Definition: commdlg.h:337
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
#define LONG_PTR
Definition: treelist.c:79
#define GetWindowLongPtr
Definition: treelist.c:73
#define SetWindowLongPtr
Definition: treelist.c:70
uint16_t * PWSTR
Definition: typedefs.h:56
int32_t INT
Definition: typedefs.h:58
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define HIWORD(l)
Definition: typedefs.h:247
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
Definition: wdfchildlist.h:690
#define ZeroMemory
Definition: winbase.h:1712
_In_ LPCSTR lpFileName
Definition: winbase.h:3071
#define GetModuleHandle
Definition: winbase.h:3827
_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 CS_VREDRAW
Definition: winuser.h:658
#define CreateWindowEx
Definition: winuser.h:5755
#define WM_CLOSE
Definition: winuser.h:1621
BOOL WINAPI SetMenu(_In_ HWND, _In_opt_ HMENU)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define WM_MDICREATE
Definition: winuser.h:1812
#define WM_CREATE
Definition: winuser.h:1608
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
#define WM_SIZE
Definition: winuser.h:1611
#define WM_COMMAND
Definition: winuser.h:1740
#define CS_HREDRAW
Definition: winuser.h:653
#define IDC_ARROW
Definition: winuser.h:687
#define UnregisterClass
Definition: winuser.h:5861
#define MDIS_ALLCHILDSTYLES
Definition: winuser.h:253
#define IDI_APPLICATION
Definition: winuser.h:704
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define RegisterClassEx
Definition: winuser.h:5837
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
#define LoadIcon
Definition: winuser.h:5813
#define SendMessage
Definition: winuser.h:5843
#define WS_EX_WINDOWEDGE
Definition: winuser.h:407
#define LoadCursor
Definition: winuser.h:5812
WNDCLASSEXA WNDCLASSEX
Definition: winuser.h:5719
#define LoadMenu
Definition: winuser.h:5817
#define GetWindowText
Definition: winuser.h:5798
#define PostMessage
Definition: winuser.h:5832
#define CW_USEDEFAULT
Definition: winuser.h:225
BOOL WINAPI DestroyMenu(_In_ HMENU)
#define SW_SHOW
Definition: winuser.h:775
#define WM_DESTROY
Definition: winuser.h:1609
#define WS_EX_CLIENTEDGE
Definition: winuser.h:384
#define SetWindowText
Definition: winuser.h:5857
#define WM_MDIGETACTIVE
Definition: winuser.h:1821
#define SWP_NOZORDER
Definition: winuser.h:1247
BOOL WINAPI DestroyWindow(_In_ HWND)
#define MAKEINTRESOURCE
Definition: winuser.h:591
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define COLOR_BTNFACE
Definition: winuser.h:928
#define COLOR_3DFACE
Definition: winuser.h:929
char TCHAR
Definition: xmlstorage.h:189
CHAR * PTSTR
Definition: xmlstorage.h:191
const CHAR * LPCTSTR
Definition: xmlstorage.h:193
CHAR * LPTSTR
Definition: xmlstorage.h:192
#define _tcslen
Definition: xmlstorage.h:198