ReactOS  0.4.14-dev-552-g2fad488
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 <stdlib.h>
22 #include <strsafe.h>
23 
24 #include "resource.h"
25 
26 #define NDEBUG
27 #include <debug.h>
28 
29 typedef struct _CONSOLE_MAINFRAME_WND
30 {
33 
37  union
38  {
40  struct
41  {
43  };
44  };
46 
47 typedef struct _CONSOLE_CHILDFRM_WND
48 {
53 
54 static const TCHAR szMMCMainFrame[] = TEXT("MMCMainFrame");
55 static const TCHAR szMMCChildFrm[] = TEXT("MMCChildFrm");
56 
58 
61 {
62  HWND hWndMDIChild;
63 
64  hWndMDIChild = (HWND)SendMessageW(hwndMDIClient, WM_MDIGETACTIVE, 0, 0);
65  if (hWndMDIChild == NULL)
66  return NULL;
67 
68  return (PCONSOLE_CHILDFRM_WND)GetWindowLongPtr(hWndMDIChild, 0);
69 }
70 
71 
72 static LPTSTR
74 {
76 
79  &lpTitle,
80  ++NewConsoleCount) == 0)
81  {
82  lpTitle = NULL;
83  }
84 
85  return lpTitle;
86 }
87 
88 HWND
91 {
93  HWND hChild;
94 
95  mcs.szTitle = CreateNewConsoleTitle();
96  mcs.szClass = szMMCChildFrm;
97  mcs.hOwner = GetModuleHandle(NULL);
98  mcs.x = mcs.cx = CW_USEDEFAULT;
99  mcs.y = mcs.cy = CW_USEDEFAULT;
100  mcs.style = MDIS_ALLCHILDSTYLES;
101 
103  if (hChild)
104  {
105  Info->nConsoleCount++;
106  }
107 
108  return hChild;
109 }
110 
111 
112 static LRESULT
114  LPARAM lParam)
115 {
117  CLIENTCREATESTRUCT ccs;
118  LPCTSTR lpFileName = (LPCTSTR)(((LPCREATESTRUCT)lParam)->lpCreateParams);
119 
122  sizeof(CONSOLE_MAINFRAME_WND));
123  if (Info == NULL)
124  return -1;
125 
126  Info->hwnd = hwnd;
127 
129  0,
130  (LONG_PTR)Info);
131 
132  Info->hMenuConsoleSmall = LoadMenu(hAppInstance,
134 
135  Info->hMenuConsoleLarge = LoadMenu(hAppInstance,
137 
138  if (lpFileName == NULL)
139  {
140  /* FIXME */
141  Info->AppAuthorMode = TRUE;
142 // Info->lpConsoleTitle = TEXT("ReactOS Management Console");
143  }
144  else
145  {
146  Info->AppAuthorMode = TRUE;
147 // Info->lpConsoleTitle = CreateNewConsoleTitle();
148  }
149 
150  SetMenu(Info->hwnd,
151  Info->hMenuConsoleSmall);
152 
153  SetWindowText(Info->hwnd, TEXT("ReactOS Management Console"));
154 
155  ccs.hWindowMenu = GetSubMenu(Info->hMenuConsoleLarge, 1);
157 
158  /* Create the MDI client window */
160  L"MDICLIENT",
161  (LPCTSTR)NULL,
167  hwnd,
168  (HMENU)0xCAC,
169  hAppInstance,
170  (LPVOID)&ccs);
171 
172  ShowWindow(Info->hwndMDIClient, SW_SHOW);
173 
174  return 0;
175 }
176 
177 
178 static VOID
181  PWSTR pFileName)
182 {
183  DPRINT1("SetFileName(&p \'%S\')\n", Info, pFileName);
184 
185  if (Info->pFileName != NULL)
186  {
187  HeapFree(GetProcessHeap(), 0, Info->pFileName);
188  Info->pFileName = NULL;
189  }
190 
191  if (pFileName != NULL)
192  {
193  Info->pFileName = HeapAlloc(GetProcessHeap(),
194  0,
195  (_tcslen(pFileName) + 1) * sizeof(TCHAR));
196  if (Info->pFileName != NULL)
197  _tcscpy(Info->pFileName, pFileName);
198  }
199 }
200 
201 static BOOL
203  HWND hWnd,
204  PCONSOLE_CHILDFRM_WND pChildInfo);
205 
206 static BOOL
208  HWND hWnd,
209  PCONSOLE_CHILDFRM_WND pChildInfo)
210 {
211  DPRINT1("pChildInfo %p\n", pChildInfo);
212 
213  DPRINT1("FileName %S\n", pChildInfo->pFileName);
214 
215  if (pChildInfo->pFileName == NULL)
216  return DoSaveFileAs(hWnd, pChildInfo);
217 
218  /* FIXME: Save the console here! */
219 
220  return TRUE;
221 }
222 
223 static BOOL
225  HWND hWnd,
226  PCONSOLE_CHILDFRM_WND pChildInfo)
227 {
228  OPENFILENAME saveas;
230 
231  DPRINT1("pChildInfo %p\n", pChildInfo);
232  DPRINT1("FileName %S\n", pChildInfo->pFileName);
233 
234  ZeroMemory(&saveas, sizeof(saveas));
235 
236  if (pChildInfo->pFileName != NULL)
237  {
238  StringCbCopy(szPath, sizeof(szPath), pChildInfo->pFileName);
239  }
240  else
241  {
242  GetWindowText(pChildInfo->hwnd, szPath, _countof(szPath));
243  StringCbCat(szPath, sizeof(szPath), TEXT(".msc"));
244  }
245 
246  saveas.lStructSize = sizeof(OPENFILENAME);
247  saveas.hwndOwner = hWnd;
248  saveas.hInstance = hAppInstance;
249  saveas.lpstrFilter = L"MSC Files\0*.msc\0";
250  saveas.lpstrFile = szPath;
251  saveas.nMaxFile = MAX_PATH;
253  saveas.lpstrDefExt = L"msc";
254 
255  if (GetSaveFileName(&saveas))
256  {
257  /* HACK: Because in ROS, Save-As boxes don't check the validity
258  * of file names and thus, here, szPath can be invalid !! We only
259  * see its validity when we call DoSaveFile()... */
260  SetFileName(pChildInfo, szPath);
261 
262  if (DoSaveFile(hWnd, pChildInfo))
263  {
264 // UpdateWindowCaption();
265  return TRUE;
266  }
267  else
268  {
269  SetFileName(pChildInfo, NULL);
270  return FALSE;
271  }
272  }
273  else
274  {
275  return FALSE;
276  }
277 }
278 
279 static BOOL
281  HWND hWnd)
282 {
283  PCONSOLE_CHILDFRM_WND pChildInfo;
284 
285  pChildInfo = GetActiveChildInfo();
286  if (pChildInfo == NULL)
287  return FALSE;
288 
289  return DoSaveFile(hWnd, pChildInfo);
290 }
291 
292 
293 static BOOL
295  HWND hWnd)
296 {
297  PCONSOLE_CHILDFRM_WND pChildInfo;
298 
299  pChildInfo = GetActiveChildInfo();
300  if (pChildInfo == NULL)
301  return FALSE;
302 
303  return DoSaveFileAs(hWnd, pChildInfo);
304 }
305 
306 static VOID
308  UINT uMsg,
309  WPARAM wParam,
310  LPARAM lParam)
311 {
313  HWND hChild;
314 
316 
317  switch (LOWORD(wParam))
318  {
319  case IDM_FILE_NEW:
321  SetMenu(Info->hwnd,
322  Info->hMenuConsoleLarge);
323  break;
324 
325  case IDM_FILE_SAVE:
326  FrameOnSave(hwnd);
327  break;
328 
329  case IDM_FILE_SAVEAS:
331  break;
332 
333  case IDM_FILE_EXIT:
334  PostMessage(hwnd, WM_CLOSE, 0, 0);
335  break;
336 
337  default:
339  {
341  }
342  else
343  {
345  if (hChild)
346  {
348  }
349  }
350  break;
351  }
352 }
353 
354 
355 static VOID
357  WORD cx,
358  WORD cy)
359 {
360  RECT rcClient; //, rcTool, rcStatus;
361 // int lvHeight, iToolHeight, iStatusHeight;
362 
363  /* Size toolbar and get height */
364 // SendMessage(Info->hTool, TB_AUTOSIZE, 0, 0);
365 // GetWindowRect(Info->hTool, &rcTool);
366 // iToolHeight = rcTool.bottom - rcTool.top;
367 
368  /* Size status bar and get height */
369 // SendMessage(Info->hStatus, WM_SIZE, 0, 0);
370 // GetWindowRect(Info->hStatus, &rcStatus);
371 // iStatusHeight = rcStatus.bottom - rcStatus.top;
372 
373  /* Calculate remaining height and size list view */
374  GetClientRect(hMainWnd, &rcClient);
375 // lvHeight = rcClient.bottom - iToolHeight - iStatusHeight;
376  SetWindowPos(hwndMDIClient, //Info->hTreeView,
377  NULL,
378  0,
379  0, //iToolHeight,
380  rcClient.right,
381  rcClient.bottom, //lvHeight,
382  SWP_NOZORDER);
383 }
384 
385 
386 static LRESULT CALLBACK
388  IN UINT uMsg,
389  IN WPARAM wParam,
390  IN LPARAM lParam)
391 {
393 
395  0);
396 
397  switch (uMsg)
398  {
399  case WM_CREATE:
400  return FrameOnCreate(hwnd,
401  lParam);
402 
403  case WM_COMMAND:
405  uMsg,
406  wParam,
407  lParam);
408  break;
409 
410  case WM_SIZE:
412  LOWORD(lParam),
413  HIWORD(lParam));
414  break;
415 
416  case WM_CLOSE:
418  break;
419 
420  case WM_DESTROY:
421  if (Info != NULL)
422  {
423  SetMenu(Info->hwnd,
424  NULL);
425 
426  if (Info->hMenuConsoleSmall != NULL)
427  {
428  DestroyMenu(Info->hMenuConsoleSmall);
429  Info->hMenuConsoleSmall = NULL;
430  }
431 
432  if (Info->hMenuConsoleLarge != NULL)
433  {
434  DestroyMenu(Info->hMenuConsoleLarge);
435  Info->hMenuConsoleLarge = NULL;
436  }
437 
439  0,
440  Info);
441  }
442 
443  PostQuitMessage(0);
444  break;
445 
446  case WM_USER_CLOSE_CHILD:
447  Info->nConsoleCount--;
448  if (Info->nConsoleCount == 0)
449  {
450  SetMenu(Info->hwnd,
451  Info->hMenuConsoleSmall);
452  }
453  break;
454 
455  default:
456  return DefFrameProc(hwnd,
458  uMsg,
459  wParam,
460  lParam);
461  }
462 
463  return 0;
464 }
465 
466 
467 static LRESULT CALLBACK
469  IN UINT uMsg,
470  IN WPARAM wParam,
471  IN LPARAM lParam)
472 {
474 
476  0);
477 
478  switch (uMsg)
479  {
480  case WM_CREATE:
483  sizeof(CONSOLE_CHILDFRM_WND));
484  if (Info != NULL)
485  {
486  Info->hwnd = hwnd;
487 
489  0,
490  (LONG_PTR)Info);
491  }
492  break;
493 
494  case WM_DESTROY:
495  if (Info != NULL)
496  {
497  if (Info->pFileName)
498  HeapFree(hAppHeap, 0, Info->pFileName);
499 
500  HeapFree(hAppHeap, 0, Info);
501  }
502 
504  break;
505 
506  default:
507  return DefMDIChildProc(hwnd, uMsg, wParam, lParam);
508  }
509 
510  return 0;
511 }
512 
513 
514 BOOL
516 {
517  WNDCLASSEX wc = {0};
518  BOOL Ret;
519 
520  /* Register the MMCMainFrame window class */
521  wc.cbSize = sizeof(WNDCLASSEX);
522  wc.style = 0;
524  wc.cbClsExtra = 0;
525  wc.cbWndExtra = sizeof(PCONSOLE_MAINFRAME_WND);
526  wc.hInstance = hAppInstance;
529  wc.hCursor = LoadCursor(NULL,
531  wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
532  wc.lpszMenuName = NULL;
534 
535  Ret = (RegisterClassEx(&wc) != (ATOM)0);
536 
537  if (Ret)
538  {
539  /* Register the MMCChildFrm window class */
540  wc.cbSize = sizeof(WNDCLASSEX);
541  wc.style = CS_HREDRAW | CS_VREDRAW;
543  wc.cbClsExtra = 0;
544  wc.cbWndExtra = sizeof(PCONSOLE_CHILDFRM_WND);
545  wc.hInstance = hAppInstance;
548  wc.hbrBackground = (HBRUSH)(COLOR_3DFACE+1);
549  wc.lpszMenuName = NULL;
552 
553  Ret = (RegisterClassEx(&wc) != (ATOM)0);
554  if (!Ret)
555  {
557  hAppInstance);
558  }
559  }
560 
561  return Ret;
562 }
563 
564 VOID
566 {
568  hAppInstance);
570  hAppInstance);
571 }
572 
573 HWND
575  int nCmdShow)
576 {
577  HWND hWndConsole;
579 
580  hWndConsole = CreateWindowEx(WS_EX_WINDOWEDGE,
582  NULL,
588  NULL,
589  NULL,
590  hAppInstance,
591  (PVOID)FileName);
592 
593  if (hWndConsole != NULL)
594  {
595  ShowWindow(hWndConsole, nCmdShow);
596  }
597 
598  return hWndConsole;
599 }
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
static LPTSTR CreateNewConsoleTitle(VOID)
Definition: console.c:73
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
UINT style
Definition: winuser.h:3177
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define WS_EX_WINDOWEDGE
Definition: winuser.h:407
#define IN
Definition: typedefs.h:38
#define LONG_PTR
Definition: treelist.c:79
VOID UnregisterMMCWndClasses(VOID)
Definition: console.c:565
LPCSTR lpszMenuName
Definition: winuser.h:3185
#define TRUE
Definition: types.h:120
PCONSOLE_CHILDFRM_WND GetActiveChildInfo(VOID)
Definition: console.c:60
const CHAR * LPCTSTR
Definition: xmlstorage.h:193
#define RegisterClassEx
Definition: winuser.h:5812
struct _CONSOLE_MAINFRAME_WND * PCONSOLE_MAINFRAME_WND
HWND hwndMDIClient
Definition: mmc.c:26
HCURSOR hCursor
Definition: winuser.h:3183
WNDPROC lpfnWndProc
Definition: winuser.h:3178
HWND hwndOwner
Definition: commdlg.h:330
LPCSTR lpszClassName
Definition: winuser.h:3186
WORD ATOM
Definition: dimm.idl:113
#define WM_USER_CLOSE_CHILD
Definition: precomp.h:14
static const TCHAR szMMCMainFrame[]
Definition: console.c:54
static HTREEITEM hChild
Definition: treeview.c:381
static LRESULT CALLBACK ConsoleChildFrmProc(IN HWND hwnd, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
Definition: console.c:468
uint16_t * PWSTR
Definition: typedefs.h:54
static BOOL FrameOnSaveAs(HWND hWnd)
Definition: console.c:294
#define IDS_CONSOLETITLE
Definition: resource.h:4
#define _countof(array)
Definition: fontsub.cpp:30
#define CALLBACK
Definition: compat.h:27
HWND hWnd
Definition: settings.c:17
HANDLE HWND
Definition: compat.h:13
_TCHAR * _tcscpy(_TCHAR *to, const _TCHAR *from)
Definition: tcscpy.h:8
#define ZeroMemory
Definition: winbase.h:1642
#define CS_HREDRAW
Definition: winuser.h:648
LPCSTR lpstrDefExt
Definition: commdlg.h:345
#define IDI_APPLICATION
Definition: winuser.h:699
UINT_PTR WPARAM
Definition: windef.h:207
#define WS_CHILD
Definition: pedump.c:617
HICON hIconSm
Definition: winuser.h:3187
#define SWP_NOZORDER
Definition: winuser.h:1232
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define WS_CLIPCHILDREN
Definition: pedump.c:619
LONG right
Definition: windef.h:308
BOOL WINAPI DestroyWindow(_In_ HWND)
#define IDM_FILE_NEW
Definition: resource.h:11
static BOOL FrameOnSave(HWND hWnd)
Definition: console.c:280
int32_t INT
Definition: typedefs.h:56
#define SetWindowLongPtr
Definition: treelist.c:70
WPARAM wParam
Definition: combotst.c:138
CHAR * LPTSTR
Definition: xmlstorage.h:192
struct TraceInfo Info
#define DefFrameProc
Definition: ros2win.h:32
#define GetWindowText
Definition: winuser.h:5773
DWORD nMaxFile
Definition: commdlg.h:337
static LRESULT CALLBACK ConsoleMainFrameWndProc(IN HWND hwnd, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
Definition: console.c:387
#define GetSaveFileName
Definition: commdlg.h:666
#define COLOR_3DFACE
Definition: winuser.h:919
HINSTANCE hInstance
Definition: winuser.h:3181
unsigned int BOOL
Definition: ntddk_ex.h:94
#define CreateWindowEx
Definition: winuser.h:5730
#define CW_USEDEFAULT
Definition: winuser.h:225
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:581
size_t __cdecl _tcslen(const _TCHAR *str)
Definition: tcslen.h:9
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
UINT cbSize
Definition: winuser.h:3176
#define IDM_CONSOLE_LARGE
Definition: resource.h:9
DWORD LoadAndFormatString(IN HINSTANCE hInstance, IN UINT uID, OUT LPTSTR *lpTarget,...)
Definition: misc.c:86
HINSTANCE hInstance
Definition: commdlg.h:331
OPENFILENAMEA OPENFILENAME
Definition: commdlg.h:657
#define SW_SHOW
Definition: winuser.h:769
struct _CONSOLE_CHILDFRM_WND * PCONSOLE_CHILDFRM_WND
CHAR * PTSTR
Definition: xmlstorage.h:191
HBRUSH hbrBackground
Definition: winuser.h:3184
#define DefMDIChildProc
Definition: ros2win.h:33
#define WM_DESTROY
Definition: winuser.h:1591
#define PostMessage
Definition: winuser.h:5807
#define OFN_PATHMUSTEXIST
Definition: commdlg.h:117
static VOID SetFileName(PCONSOLE_CHILDFRM_WND Info, PWSTR pFileName)
Definition: console.c:179
#define CS_VREDRAW
Definition: winuser.h:653
char TCHAR
Definition: xmlstorage.h:189
#define StringCbCat
Definition: strsafe.h:334
#define GetProcessHeap()
Definition: compat.h:403
HWND CreateConsoleWindow(IN LPCTSTR lpFileName OPTIONAL, int nCmdShow)
Definition: console.c:574
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define WM_SIZE
Definition: winuser.h:1593
#define MDIS_ALLCHILDSTYLES
Definition: winuser.h:253
BOOL WINAPI SetMenu(_In_ HWND, _In_opt_ HMENU)
BOOL RegisterMMCWndClasses(VOID)
Definition: console.c:515
#define WM_CLOSE
Definition: winuser.h:1603
#define MAX_PATH
Definition: compat.h:26
DWORD lStructSize
Definition: commdlg.h:329
#define IDM_MDI_FIRSTCHILD
Definition: resource.h:19
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
int cbWndExtra
Definition: winuser.h:3180
static LRESULT FrameOnCreate(HWND hwnd, LPARAM lParam)
Definition: console.c:113
#define WS_HSCROLL
Definition: pedump.c:628
#define WM_MDIGETACTIVE
Definition: winuser.h:1803
struct _CONSOLE_CHILDFRM_WND CONSOLE_CHILDFRM_WND
HWND hMainWnd
Definition: magnifier.c:32
#define StringCbCopy
Definition: strsafe.h:155
static ULONG NewConsoleCount
Definition: console.c:57
HICON hIcon
Definition: winuser.h:3182
static const WCHAR L[]
Definition: oid.c:1250
HANDLE hAppHeap
Definition: mmc.c:24
#define COLOR_BTNFACE
Definition: winuser.h:918
#define OFN_HIDEREADONLY
Definition: commdlg.h:107
static BOOL DoSaveFile(HWND hWnd, PCONSOLE_CHILDFRM_WND pChildInfo)
Definition: console.c:207
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
#define WM_COMMAND
Definition: winuser.h:1722
#define LoadCursor
Definition: winuser.h:5787
BOOL WINAPI DestroyMenu(_In_ HMENU)
static VOID FrameOnSize(HWND hMainWnd, WORD cx, WORD cy)
Definition: console.c:356
static BOOL DoSaveFileAs(HWND hWnd, PCONSOLE_CHILDFRM_WND pChildInfo)
Definition: console.c:224
struct _CONSOLE_MAINFRAME_WND CONSOLE_MAINFRAME_WND
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define IDM_FILE_SAVEAS
Definition: resource.h:14
int cbClsExtra
Definition: winuser.h:3179
#define TEXT(s)
Definition: k32.h:26
#define WS_BORDER
Definition: pedump.c:625
#define WS_EX_CLIENTEDGE
Definition: winuser.h:384
#define LoadMenu
Definition: winuser.h:5792
#define GetModuleHandle
Definition: winbase.h:3661
LPSTR lpstrFile
Definition: commdlg.h:336
LPCWSTR szPath
Definition: env.c:35
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
static const TCHAR szMMCChildFrm[]
Definition: console.c:55
#define OFN_OVERWRITEPROMPT
Definition: commdlg.h:116
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define SetWindowText
Definition: winuser.h:5832
LPCSTR lpstrFilter
Definition: commdlg.h:332
unsigned int UINT
Definition: ndis.h:50
static VOID FrameOnCommand(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: console.c:307
#define WS_VSCROLL
Definition: pedump.c:627
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
#define DPRINT1
Definition: precomp.h:8
#define WM_MDICREATE
Definition: winuser.h:1794
#define IDC_ARROW
Definition: winuser.h:682
_Out_opt_ int * cx
Definition: commctrl.h:581
#define SendMessage
Definition: winuser.h:5818
#define WM_CREATE
Definition: winuser.h:1590
static struct myctx * mcs
Definition: adnstest.c:53
TCHAR lpTitle[80]
Definition: ctm.c:69
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
#define HIWORD(l)
Definition: typedefs.h:246
unsigned int ULONG
Definition: retypes.h:1
#define IDM_CONSOLE_SMALL
Definition: resource.h:8
LONG bottom
Definition: windef.h:309
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
WNDCLASSEXA WNDCLASSEX
Definition: winuser.h:5694
#define LoadIcon
Definition: winuser.h:5788
#define GetWindowLongPtr
Definition: treelist.c:73
LONG_PTR LRESULT
Definition: windef.h:209
HWND CreateNewMDIChild(PCONSOLE_MAINFRAME_WND Info, HWND hwndMDIClient)
Definition: console.c:89
#define WS_VISIBLE
Definition: pedump.c:620
HWND hwndMainConsole
Definition: mmc.c:25
#define UnregisterClass
Definition: winuser.h:5836
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
#define HeapFree(x, y, z)
Definition: compat.h:402
PCONSOLE_MAINFRAME_WND MainFrame
Definition: console.c:50
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
#define IDM_FILE_EXIT
Definition: resource.h:15
_In_ LPCSTR lpFileName
Definition: winbase.h:3028
HINSTANCE hAppInstance
Definition: mmc.c:23
#define IDI_MAINAPP
Definition: resource.h:6
#define IDM_FILE_SAVE
Definition: resource.h:13
DWORD Flags
Definition: commdlg.h:342
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68