ReactOS  0.4.15-dev-5492-g47f3a4e
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 
30 typedef struct _CONSOLE_MAINFRAME_WND
31 {
34 
38  union
39  {
41  struct
42  {
44  };
45  };
47 
48 typedef struct _CONSOLE_CHILDFRM_WND
49 {
54 
55 static const TCHAR szMMCMainFrame[] = TEXT("MMCMainFrame");
56 static 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 
73 static LPTSTR
75 {
77 
80  &lpTitle,
81  ++NewConsoleCount) == 0)
82  {
83  lpTitle = NULL;
84  }
85 
86  return lpTitle;
87 }
88 
89 HWND
92 {
94  HWND hChild;
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 
113 static LRESULT
115  LPARAM lParam)
116 {
118  CLIENTCREATESTRUCT ccs;
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,
170  hAppInstance,
171  (LPVOID)&ccs);
172 
173  ShowWindow(Info->hwndMDIClient, SW_SHOW);
174 
175  return 0;
176 }
177 
178 
179 static 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 
202 static BOOL
204  HWND hWnd,
205  PCONSOLE_CHILDFRM_WND pChildInfo);
206 
207 static 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 
224 static 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 
280 static 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 
294 static 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 
307 static VOID
309  UINT uMsg,
310  WPARAM wParam,
311  LPARAM lParam)
312 {
314  HWND hChild;
315  LPTSTR lpTitle;
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:
328  FrameOnSave(hwnd);
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 
366 static 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,
393  SWP_NOZORDER);
394 }
395 
396 
397 static LRESULT CALLBACK
399  IN UINT uMsg,
400  IN WPARAM wParam,
401  IN LPARAM lParam)
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 
454  PostQuitMessage(0);
455  break;
456 
457  case WM_USER_CLOSE_CHILD:
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 
478 static LRESULT CALLBACK
480  IN UINT uMsg,
481  IN WPARAM wParam,
482  IN LPARAM lParam)
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 
511  HeapFree(hAppHeap, 0, Info);
512  }
513 
515  break;
516 
517  default:
518  return DefMDIChildProc(hwnd, uMsg, wParam, lParam);
519  }
520 
521  return 0;
522 }
523 
524 
525 BOOL
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;
536  wc.cbWndExtra = sizeof(PCONSOLE_MAINFRAME_WND);
537  wc.hInstance = hAppInstance;
540  wc.hCursor = LoadCursor(NULL,
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);
552  wc.style = CS_HREDRAW | CS_VREDRAW;
554  wc.cbClsExtra = 0;
555  wc.cbWndExtra = sizeof(PCONSOLE_CHILDFRM_WND);
556  wc.hInstance = hAppInstance;
559  wc.hbrBackground = (HBRUSH)(COLOR_3DFACE+1);
560  wc.lpszMenuName = NULL;
563 
564  Ret = (RegisterClassEx(&wc) != (ATOM)0);
565  if (!Ret)
566  {
568  hAppInstance);
569  }
570  }
571 
572  return Ret;
573 }
574 
575 VOID
577 {
579  hAppInstance);
581  hAppInstance);
582 }
583 
584 HWND
586  int nCmdShow)
587 {
588  HWND hWndConsole;
590 
591  hWndConsole = CreateWindowEx(WS_EX_WINDOWEDGE,
593  NULL,
599  NULL,
600  NULL,
601  hAppInstance,
602  (PVOID)FileName);
603 
604  if (hWndConsole != NULL)
605  {
606  ShowWindow(hWndConsole, nCmdShow);
607  }
608 
609  return hWndConsole;
610 }
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
static LPTSTR CreateNewConsoleTitle(VOID)
Definition: console.c:74
#define OFN_EXPLORER
Definition: commdlg.h:104
UINT style
Definition: winuser.h:3192
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define WS_EX_WINDOWEDGE
Definition: winuser.h:407
#define IN
Definition: typedefs.h:39
#define LONG_PTR
Definition: treelist.c:79
VOID UnregisterMMCWndClasses(VOID)
Definition: console.c:576
LPCSTR lpszMenuName
Definition: winuser.h:3200
PCONSOLE_CHILDFRM_WND GetActiveChildInfo(VOID)
Definition: console.c:61
const CHAR * LPCTSTR
Definition: xmlstorage.h:193
#define RegisterClassEx
Definition: winuser.h:5827
struct _CONSOLE_MAINFRAME_WND * PCONSOLE_MAINFRAME_WND
HWND hwndMDIClient
Definition: mmc.c:26
INT AllocAndLoadString(OUT LPTSTR *lpTarget, IN HINSTANCE hInst, IN UINT uID)
Definition: misc.c:59
HCURSOR hCursor
Definition: winuser.h:3198
WNDPROC lpfnWndProc
Definition: winuser.h:3193
#define IDS_APPTITLE
Definition: resource.h:3
HWND hwndOwner
Definition: commdlg.h:330
LPCSTR lpszClassName
Definition: winuser.h:3201
WORD ATOM
Definition: dimm.idl:113
#define WM_USER_CLOSE_CHILD
Definition: precomp.h:14
static const TCHAR szMMCMainFrame[]
Definition: console.c:55
static HTREEITEM hChild
Definition: treeview.c:381
#define TRUE
Definition: types.h:120
static LRESULT CALLBACK ConsoleChildFrmProc(IN HWND hwnd, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
Definition: console.c:479
uint16_t * PWSTR
Definition: typedefs.h:56
static BOOL FrameOnSaveAs(HWND hWnd)
Definition: console.c:295
#define IDS_CONSOLETITLE
Definition: resource.h:4
#define CALLBACK
Definition: compat.h:35
HWND hWnd
Definition: settings.c:17
HANDLE HWND
Definition: compat.h:19
_TCHAR * _tcscpy(_TCHAR *to, const _TCHAR *from)
Definition: tcscpy.h:8
#define ZeroMemory
Definition: winbase.h:1670
#define CS_HREDRAW
Definition: winuser.h:648
LPCSTR lpstrDefExt
Definition: commdlg.h:345
#define IDM_HELP_ABOUT
Definition: resource.h:385
#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:3202
#define SWP_NOZORDER
Definition: winuser.h:1237
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:281
int32_t INT
Definition: typedefs.h:58
#define SetWindowLongPtr
Definition: treelist.c:70
WPARAM wParam
Definition: combotst.c:138
CHAR * LPTSTR
Definition: xmlstorage.h:192
#define DefFrameProc
Definition: ros2win.h:32
#define GetWindowText
Definition: winuser.h:5788
DWORD nMaxFile
Definition: commdlg.h:337
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
Definition: wdfchildlist.h:683
static LRESULT CALLBACK ConsoleMainFrameWndProc(IN HWND hwnd, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
Definition: console.c:398
#define GetSaveFileName
Definition: commdlg.h:666
#define L(x)
Definition: ntvdm.h:50
#define COLOR_3DFACE
Definition: winuser.h:923
#define FALSE
Definition: types.h:117
HINSTANCE hInstance
Definition: winuser.h:3196
unsigned int BOOL
Definition: ntddk_ex.h:94
#define CreateWindowEx
Definition: winuser.h:5745
#define CW_USEDEFAULT
Definition: winuser.h:225
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:585
size_t __cdecl _tcslen(const _TCHAR *str)
Definition: tcslen.h:9
LONG_PTR LPARAM
Definition: windef.h:208
UINT cbSize
Definition: winuser.h:3191
#define IDM_CONSOLE_LARGE
Definition: resource.h:9
DWORD LoadAndFormatString(IN HINSTANCE hInstance, IN UINT uID, OUT LPTSTR *lpTarget,...)
Definition: misc.c:85
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:3199
#define DefMDIChildProc
Definition: ros2win.h:33
#define WM_DESTROY
Definition: winuser.h:1599
#define PostMessage
Definition: winuser.h:5822
#define OFN_PATHMUSTEXIST
Definition: commdlg.h:117
static VOID SetFileName(PCONSOLE_CHILDFRM_WND Info, PWSTR pFileName)
Definition: console.c:180
#define CS_VREDRAW
Definition: winuser.h:653
char TCHAR
Definition: xmlstorage.h:189
#define StringCbCat
Definition: strsafe.h:334
#define GetProcessHeap()
Definition: compat.h:736
HWND CreateConsoleWindow(IN LPCTSTR lpFileName OPTIONAL, int nCmdShow)
Definition: console.c:585
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define WM_SIZE
Definition: winuser.h:1601
#define MDIS_ALLCHILDSTYLES
Definition: winuser.h:253
BOOL WINAPI SetMenu(_In_ HWND, _In_opt_ HMENU)
BOOL RegisterMMCWndClasses(VOID)
Definition: console.c:526
#define _countof(array)
Definition: sndvol32.h:68
#define WM_CLOSE
Definition: winuser.h:1611
#define MAX_PATH
Definition: compat.h:34
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:3195
#define ShellAbout
Definition: shellapi.h:690
static LRESULT FrameOnCreate(HWND hwnd, LPARAM lParam)
Definition: console.c:114
#define WS_HSCROLL
Definition: pedump.c:628
#define WM_MDIGETACTIVE
Definition: winuser.h:1811
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:58
HICON hIcon
Definition: winuser.h:3197
HANDLE hAppHeap
Definition: mmc.c:24
#define COLOR_BTNFACE
Definition: winuser.h:922
#define OFN_HIDEREADONLY
Definition: commdlg.h:107
static BOOL DoSaveFile(HWND hWnd, PCONSOLE_CHILDFRM_WND pChildInfo)
Definition: console.c:208
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
#define WM_COMMAND
Definition: winuser.h:1730
#define LoadCursor
Definition: winuser.h:5802
BOOL WINAPI DestroyMenu(_In_ HMENU)
static VOID FrameOnSize(HWND hMainWnd, WORD cx, WORD cy)
Definition: console.c:367
static BOOL DoSaveFileAs(HWND hWnd, PCONSOLE_CHILDFRM_WND pChildInfo)
Definition: console.c:225
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:3194
#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:5807
#define GetModuleHandle
Definition: winbase.h:3698
LPSTR lpstrFile
Definition: commdlg.h:336
LPCWSTR szPath
Definition: env.c:37
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1577
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
static const TCHAR szMMCChildFrm[]
Definition: console.c:56
#define OFN_OVERWRITEPROMPT
Definition: commdlg.h:116
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define SetWindowText
Definition: winuser.h:5847
LPCSTR lpstrFilter
Definition: commdlg.h:332
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static VOID FrameOnCommand(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: console.c:308
#define WS_VSCROLL
Definition: pedump.c:627
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
#define DPRINT1
Definition: precomp.h:8
#define WM_MDICREATE
Definition: winuser.h:1802
#define IDC_ARROW
Definition: winuser.h:682
_Out_opt_ int * cx
Definition: commctrl.h:585
#define SendMessage
Definition: winuser.h:5833
#define WM_CREATE
Definition: winuser.h:1598
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:247
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:5709
#define LoadIcon
Definition: winuser.h:5803
#define GetWindowLongPtr
Definition: treelist.c:73
LONG_PTR LRESULT
Definition: windef.h:209
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4022
HWND CreateNewMDIChild(PCONSOLE_MAINFRAME_WND Info, HWND hwndMDIClient)
Definition: console.c:90
#define WS_VISIBLE
Definition: pedump.c:620
HWND hwndMainConsole
Definition: mmc.c:25
#define UnregisterClass
Definition: winuser.h:5851
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:735
PCONSOLE_MAINFRAME_WND MainFrame
Definition: console.c:51
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
#define IDM_FILE_EXIT
Definition: resource.h:15
_In_ LPCSTR lpFileName
Definition: winbase.h:3058
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