ReactOS  0.4.11-dev-946-g431643b
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 
22 #include "resource.h"
23 
24 #define NDEBUG
25 #include <debug.h>
26 
27 typedef struct _CONSOLE_MAINFRAME_WND
28 {
31 
35  union
36  {
38  struct
39  {
41  };
42  };
44 
45 typedef struct _CONSOLE_CHILDFRM_WND
46 {
48  PCONSOLE_MAINFRAME_WND MainFrame;
51 
52 static const TCHAR szMMCMainFrame[] = TEXT("MMCMainFrame");
53 static const TCHAR szMMCChildFrm[] = TEXT("MMCChildFrm");
54 
56 
57 PCONSOLE_CHILDFRM_WND
59 {
60  HWND hWndMDIChild;
61 
62  hWndMDIChild = (HWND)SendMessageW(hwndMDIClient, WM_MDIGETACTIVE, 0, 0);
63  if (hWndMDIChild == NULL)
64  return NULL;
65 
66  return (PCONSOLE_CHILDFRM_WND)GetWindowLongPtr(hWndMDIChild, 0);
67 }
68 
69 
70 static LPTSTR
72 {
74 
77  &lpTitle,
78  ++NewConsoleCount) == 0)
79  {
80  lpTitle = NULL;
81  }
82 
83  return lpTitle;
84 }
85 
86 HWND
87 CreateNewMDIChild(PCONSOLE_MAINFRAME_WND Info,
89 {
91  HWND hChild;
92 
94  mcs.szClass = szMMCChildFrm;
96  mcs.x = mcs.cx = CW_USEDEFAULT;
97  mcs.y = mcs.cy = CW_USEDEFAULT;
99 
100  hChild = (HWND)SendMessage(hwndMDIClient, WM_MDICREATE, 0, (LPARAM)&mcs);
101  if (hChild)
102  {
103  Info->nConsoleCount++;
104  }
105 
106  return hChild;
107 }
108 
109 
110 static LRESULT
112  LPARAM lParam)
113 {
114  PCONSOLE_MAINFRAME_WND Info;
115  CLIENTCREATESTRUCT ccs;
116  LPCTSTR lpFileName = (LPCTSTR)(((LPCREATESTRUCT)lParam)->lpCreateParams);
117 
118  Info = HeapAlloc(hAppHeap,
120  sizeof(CONSOLE_MAINFRAME_WND));
121  if (Info == NULL)
122  return -1;
123 
124  Info->hwnd = hwnd;
125 
126  SetWindowLongPtr(hwnd,
127  0,
128  (LONG_PTR)Info);
129 
130  Info->hMenuConsoleSmall = LoadMenu(hAppInstance,
132 
133  Info->hMenuConsoleLarge = LoadMenu(hAppInstance,
135 
136  if (lpFileName == NULL)
137  {
138  /* FIXME */
139  Info->AppAuthorMode = TRUE;
140 // Info->lpConsoleTitle = TEXT("ReactOS Management Console");
141  }
142  else
143  {
144  Info->AppAuthorMode = TRUE;
145 // Info->lpConsoleTitle = CreateNewConsoleTitle();
146  }
147 
148  SetMenu(Info->hwnd,
149  Info->hMenuConsoleSmall);
150 
151  SetWindowText(Info->hwnd, TEXT("ReactOS Management Console"));
152 
153  ccs.hWindowMenu = GetSubMenu(Info->hMenuConsoleLarge, 1);
155 
156  /* Create the MDI client window */
158  L"MDICLIENT",
159  (LPCTSTR)NULL,
165  hwnd,
166  (HMENU)0xCAC,
167  hAppInstance,
168  (LPVOID)&ccs);
169 
170  ShowWindow(Info->hwndMDIClient, SW_SHOW);
171 
172  return 0;
173 }
174 
175 
176 static VOID
178  PCONSOLE_CHILDFRM_WND Info,
179  PWSTR pFileName)
180 {
181  DPRINT1("SetFileName(&p \'%S\')\n", Info, pFileName);
182 
183  if (Info->pFileName != NULL)
184  {
185  HeapFree(GetProcessHeap(), 0, Info->pFileName);
186  Info->pFileName = NULL;
187  }
188 
189  if (pFileName != NULL)
190  {
192  0,
193  (_tcslen(pFileName) + 1) * sizeof(TCHAR));
194  if (Info->pFileName != NULL)
195  _tcscpy(Info->pFileName, pFileName);
196  }
197 }
198 
199 static BOOL
201  HWND hWnd,
202  PCONSOLE_CHILDFRM_WND pChildInfo);
203 
204 static BOOL
206  HWND hWnd,
207  PCONSOLE_CHILDFRM_WND pChildInfo)
208 {
209  DPRINT1("pChildInfo %p\n", pChildInfo);
210 
211  DPRINT1("FileName %S\n", pChildInfo->pFileName);
212 
213  if (pChildInfo->pFileName == NULL)
214  return DoSaveFileAs(hWnd, pChildInfo);
215 
216  /* FIXME: Save the console here! */
217 
218  return TRUE;
219 }
220 
221 static BOOL
223  HWND hWnd,
224  PCONSOLE_CHILDFRM_WND pChildInfo)
225 {
226  OPENFILENAME saveas;
228 
229  DPRINT1("pChildInfo %p\n", pChildInfo);
230  DPRINT1("FileName %S\n", pChildInfo->pFileName);
231 
232  ZeroMemory(&saveas, sizeof(saveas));
233 
234  if (pChildInfo->pFileName != NULL)
235  {
236  _tcscpy(szPath, pChildInfo->pFileName);
237  }
238  else
239  {
240  GetWindowText(pChildInfo->hwnd, szPath, MAX_PATH);
241  _tcscat(szPath, TEXT(".msc"));
242  }
243 
244  saveas.lStructSize = sizeof(OPENFILENAME);
245  saveas.hwndOwner = hWnd;
246  saveas.hInstance = hAppInstance;
247  saveas.lpstrFilter = L"MSC Files\0*.msc\0";
248  saveas.lpstrFile = szPath;
249  saveas.nMaxFile = MAX_PATH;
251  saveas.lpstrDefExt = L"msc";
252 
253  if (GetSaveFileName(&saveas))
254  {
255  /* HACK: Because in ROS, Save-As boxes don't check the validity
256  * of file names and thus, here, szPath can be invalid !! We only
257  * see its validity when we call DoSaveFile()... */
258  SetFileName(pChildInfo, szPath);
259 
260  if (DoSaveFile(hWnd, pChildInfo))
261  {
262 // UpdateWindowCaption();
263  return TRUE;
264  }
265  else
266  {
267  SetFileName(pChildInfo, NULL);
268  return FALSE;
269  }
270  }
271  else
272  {
273  return FALSE;
274  }
275 }
276 
277 static BOOL
279  HWND hWnd)
280 {
281  PCONSOLE_CHILDFRM_WND pChildInfo;
282 
283  pChildInfo = GetActiveChildInfo();
284  if (pChildInfo == NULL)
285  return FALSE;
286 
287  return DoSaveFile(hWnd, pChildInfo);
288 }
289 
290 
291 static BOOL
293  HWND hWnd)
294 {
295  PCONSOLE_CHILDFRM_WND pChildInfo;
296 
297  pChildInfo = GetActiveChildInfo();
298  if (pChildInfo == NULL)
299  return FALSE;
300 
301  return DoSaveFileAs(hWnd, pChildInfo);
302 }
303 
304 static VOID
306  UINT uMsg,
307  WPARAM wParam,
308  LPARAM lParam)
309 {
310  PCONSOLE_MAINFRAME_WND Info;
311  HWND hChild;
312 
313  Info = (PCONSOLE_MAINFRAME_WND)GetWindowLongPtr(hwnd, 0);
314 
315  switch (LOWORD(wParam))
316  {
317  case IDM_FILE_NEW:
319  SetMenu(Info->hwnd,
320  Info->hMenuConsoleLarge);
321  break;
322 
323  case IDM_FILE_SAVE:
324  FrameOnSave(hwnd);
325  break;
326 
327  case IDM_FILE_SAVEAS:
328  FrameOnSaveAs(hwnd);
329  break;
330 
331  case IDM_FILE_EXIT:
332  PostMessage(hwnd, WM_CLOSE, 0, 0);
333  break;
334 
335  default:
336  if (LOWORD(wParam) >= IDM_MDI_FIRSTCHILD)
337  {
338  DefFrameProc(hwnd, hwndMDIClient, uMsg, wParam, lParam);
339  }
340  else
341  {
342  hChild = (HWND)SendMessage(hwndMDIClient, WM_MDIGETACTIVE, 0, 0);
343  if (hChild)
344  {
345  SendMessage(hChild, WM_COMMAND, wParam, lParam);
346  }
347  }
348  break;
349  }
350 }
351 
352 
353 static VOID
355  WORD cx,
356  WORD cy)
357 {
358  RECT rcClient; //, rcTool, rcStatus;
359 // int lvHeight, iToolHeight, iStatusHeight;
360 
361  /* Size toolbar and get height */
362 // SendMessage(Info->hTool, TB_AUTOSIZE, 0, 0);
363 // GetWindowRect(Info->hTool, &rcTool);
364 // iToolHeight = rcTool.bottom - rcTool.top;
365 
366  /* Size status bar and get height */
367 // SendMessage(Info->hStatus, WM_SIZE, 0, 0);
368 // GetWindowRect(Info->hStatus, &rcStatus);
369 // iStatusHeight = rcStatus.bottom - rcStatus.top;
370 
371  /* Calculate remaining height and size list view */
372  GetClientRect(hMainWnd, &rcClient);
373 // lvHeight = rcClient.bottom - iToolHeight - iStatusHeight;
374  SetWindowPos(hwndMDIClient, //Info->hTreeView,
375  NULL,
376  0,
377  0, //iToolHeight,
378  rcClient.right,
379  rcClient.bottom, //lvHeight,
380  SWP_NOZORDER);
381 }
382 
383 
384 static LRESULT CALLBACK
386  IN UINT uMsg,
387  IN WPARAM wParam,
388  IN LPARAM lParam)
389 {
390  PCONSOLE_MAINFRAME_WND Info;
391 
393  0);
394 
395  switch (uMsg)
396  {
397  case WM_CREATE:
398  return FrameOnCreate(hwnd,
399  lParam);
400 
401  case WM_COMMAND:
402  FrameOnCommand(hwnd,
403  uMsg,
404  wParam,
405  lParam);
406  break;
407 
408  case WM_SIZE:
409  FrameOnSize(hwnd,
410  LOWORD(lParam),
411  HIWORD(lParam));
412  break;
413 
414  case WM_CLOSE:
415  DestroyWindow(hwnd);
416  break;
417 
418  case WM_DESTROY:
419  if (Info != NULL)
420  {
421  SetMenu(Info->hwnd,
422  NULL);
423 
424  if (Info->hMenuConsoleSmall != NULL)
425  {
427  Info->hMenuConsoleSmall = NULL;
428  }
429 
430  if (Info->hMenuConsoleLarge != NULL)
431  {
433  Info->hMenuConsoleLarge = NULL;
434  }
435 
437  0,
438  Info);
439  }
440 
441  PostQuitMessage(0);
442  break;
443 
444  case WM_USER_CLOSE_CHILD:
445  Info->nConsoleCount--;
446  if (Info->nConsoleCount == 0)
447  {
448  SetMenu(Info->hwnd,
449  Info->hMenuConsoleSmall);
450  }
451  break;
452 
453  default:
454  return DefFrameProc(hwnd,
456  uMsg,
457  wParam,
458  lParam);
459  }
460 
461  return 0;
462 }
463 
464 
465 static LRESULT CALLBACK
467  IN UINT uMsg,
468  IN WPARAM wParam,
469  IN LPARAM lParam)
470 {
471  PCONSOLE_CHILDFRM_WND Info;
472 
474  0);
475 
476  switch (uMsg)
477  {
478  case WM_CREATE:
479  Info = HeapAlloc(hAppHeap,
481  sizeof(CONSOLE_CHILDFRM_WND));
482  if (Info != NULL)
483  {
484  Info->hwnd = hwnd;
485 
486  SetWindowLongPtr(hwnd,
487  0,
488  (LONG_PTR)Info);
489  }
490  break;
491 
492  case WM_DESTROY:
493  if (Info != NULL)
494  {
495  if (Info->pFileName)
496  HeapFree(hAppHeap, 0, Info->pFileName);
497 
498  HeapFree(hAppHeap, 0, Info);
499  }
500 
502  break;
503 
504  default:
505  return DefMDIChildProc(hwnd, uMsg, wParam, lParam);
506  }
507 
508  return 0;
509 }
510 
511 
512 BOOL
514 {
515  WNDCLASSEX wc = {0};
516  BOOL Ret;
517 
518  /* Register the MMCMainFrame window class */
519  wc.cbSize = sizeof(WNDCLASSEX);
520  wc.style = 0;
522  wc.cbClsExtra = 0;
523  wc.cbWndExtra = sizeof(PCONSOLE_MAINFRAME_WND);
524  wc.hInstance = hAppInstance;
527  wc.hCursor = LoadCursor(NULL,
529  wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
530  wc.lpszMenuName = NULL;
532 
533  Ret = (RegisterClassEx(&wc) != (ATOM)0);
534 
535  if (Ret)
536  {
537  /* Register the MMCChildFrm window class */
538  wc.cbSize = sizeof(WNDCLASSEX);
539  wc.style = CS_HREDRAW | CS_VREDRAW;
541  wc.cbClsExtra = 0;
542  wc.cbWndExtra = sizeof(PCONSOLE_CHILDFRM_WND);
543  wc.hInstance = hAppInstance;
546  wc.hbrBackground = (HBRUSH)(COLOR_3DFACE+1);
547  wc.lpszMenuName = NULL;
550 
551  Ret = (RegisterClassEx(&wc) != (ATOM)0);
552  if (!Ret)
553  {
555  hAppInstance);
556  }
557  }
558 
559  return Ret;
560 }
561 
562 VOID
564 {
566  hAppInstance);
568  hAppInstance);
569 }
570 
571 HWND
573  int nCmdShow)
574 {
575  HWND hWndConsole;
577 
578  hWndConsole = CreateWindowEx(WS_EX_WINDOWEDGE,
580  NULL,
586  NULL,
587  NULL,
588  hAppInstance,
589  (PVOID)FileName);
590 
591  if (hWndConsole != NULL)
592  {
593  ShowWindow(hWndConsole, nCmdShow);
594  }
595 
596  return hWndConsole;
597 }
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
static LPTSTR CreateNewConsoleTitle(VOID)
Definition: console.c:71
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
UINT style
Definition: winuser.h:3155
#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:563
LPCSTR lpszMenuName
Definition: winuser.h:3163
#define TRUE
Definition: types.h:120
PCONSOLE_CHILDFRM_WND GetActiveChildInfo(VOID)
Definition: console.c:58
const CHAR * LPCTSTR
Definition: xmlstorage.h:193
#define RegisterClassEx
Definition: winuser.h:5703
struct _CONSOLE_MAINFRAME_WND * PCONSOLE_MAINFRAME_WND
HCURSOR hCursor
Definition: winuser.h:3161
WNDPROC lpfnWndProc
Definition: winuser.h:3156
HWND hwndOwner
Definition: commdlg.h:330
LPCSTR lpszClassName
Definition: winuser.h:3164
WORD ATOM
Definition: dimm.idl:113
#define WM_USER_CLOSE_CHILD
Definition: precomp.h:14
static const TCHAR szMMCMainFrame[]
Definition: console.c:52
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:466
uint16_t * PWSTR
Definition: typedefs.h:54
static BOOL FrameOnSaveAs(HWND hWnd)
Definition: console.c:292
#define IDS_CONSOLETITLE
Definition: resource.h:4
#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:1635
#define CS_HREDRAW
Definition: winuser.h:648
LPCSTR lpstrDefExt
Definition: commdlg.h:345
#define IDI_APPLICATION
Definition: winuser.h:699
#define WS_CHILD
Definition: pedump.c:617
HICON hIconSm
Definition: winuser.h:3165
#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:298
BOOL WINAPI DestroyWindow(_In_ HWND)
#define IDM_FILE_NEW
Definition: resource.h:11
static BOOL FrameOnSave(HWND hWnd)
Definition: console.c:278
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:5664
DWORD nMaxFile
Definition: commdlg.h:337
UINT_PTR WPARAM
Definition: windef.h:207
static LRESULT CALLBACK ConsoleMainFrameWndProc(IN HWND hwnd, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
Definition: console.c:385
#define GetSaveFileName
Definition: commdlg.h:666
#define COLOR_3DFACE
Definition: winuser.h:919
HINSTANCE hInstance
Definition: winuser.h:3159
LONG_PTR LPARAM
Definition: windef.h:208
#define CreateWindowEx
Definition: winuser.h:5621
#define CW_USEDEFAULT
Definition: winuser.h:225
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:570
size_t __cdecl _tcslen(const _TCHAR *str)
Definition: tcslen.h:9
smooth NULL
Definition: ftsmooth.c:416
UINT cbSize
Definition: winuser.h:3154
#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:3162
#define DefMDIChildProc
Definition: ros2win.h:33
#define WM_DESTROY
Definition: winuser.h:1591
#define PostMessage
Definition: winuser.h:5698
#define OFN_PATHMUSTEXIST
Definition: commdlg.h:117
static VOID SetFileName(PCONSOLE_CHILDFRM_WND Info, PWSTR pFileName)
Definition: console.c:177
#define CS_VREDRAW
Definition: winuser.h:653
char TCHAR
Definition: xmlstorage.h:189
unsigned int BOOL
Definition: ntddk_ex.h:94
#define GetProcessHeap()
Definition: compat.h:395
HWND CreateConsoleWindow(IN LPCTSTR lpFileName OPTIONAL, int nCmdShow)
Definition: console.c:572
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:513
#define WM_CLOSE
Definition: winuser.h:1603
#define MAX_PATH
Definition: compat.h:26
DWORD lStructSize
Definition: commdlg.h:329
unsigned int UINT
Definition: ndis.h:50
#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:3158
static LRESULT FrameOnCreate(HWND hwnd, LPARAM lParam)
Definition: console.c:111
#define WS_HSCROLL
Definition: pedump.c:628
#define WM_MDIGETACTIVE
Definition: winuser.h:1797
struct _CONSOLE_CHILDFRM_WND CONSOLE_CHILDFRM_WND
HWND hMainWnd
Definition: magnifier.c:33
static ULONG NewConsoleCount
Definition: console.c:55
HICON hIcon
Definition: winuser.h:3160
static const WCHAR L[]
Definition: oid.c:1087
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:205
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
#define WM_COMMAND
Definition: winuser.h:1716
#define LoadCursor
Definition: winuser.h:5678
BOOL WINAPI DestroyMenu(_In_ HMENU)
static VOID FrameOnSize(HWND hMainWnd, WORD cx, WORD cy)
Definition: console.c:354
static BOOL DoSaveFileAs(HWND hWnd, PCONSOLE_CHILDFRM_WND pChildInfo)
Definition: console.c:222
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:3157
#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:5683
#define GetModuleHandle
Definition: winbase.h:3641
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:53
#define OFN_OVERWRITEPROMPT
Definition: commdlg.h:116
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define SetWindowText
Definition: winuser.h:5723
LPCSTR lpstrFilter
Definition: commdlg.h:332
static VOID FrameOnCommand(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: console.c:305
#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:1788
#define IDC_ARROW
Definition: winuser.h:682
_Out_opt_ int * cx
Definition: commctrl.h:570
#define SendMessage
Definition: winuser.h:5709
_TCHAR * _tcscat(_TCHAR *s, const _TCHAR *append)
Definition: tcscat.h:8
#define WM_CREATE
Definition: winuser.h:1590
static struct myctx * mcs
Definition: adnstest.c:53
TCHAR lpTitle[80]
Definition: ctm.c:67
#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:299
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
WNDCLASSEXA WNDCLASSEX
Definition: winuser.h:5585
#define LoadIcon
Definition: winuser.h:5679
#define GetWindowLongPtr
Definition: treelist.c:73
LONG_PTR LRESULT
Definition: windef.h:209
HWND CreateNewMDIChild(PCONSOLE_MAINFRAME_WND Info, HWND hwndMDIClient)
Definition: console.c:87
#define WS_VISIBLE
Definition: pedump.c:620
HWND hwndMainConsole
Definition: mmc.c:25
#define UnregisterClass
Definition: winuser.h:5727
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:394
PCONSOLE_MAINFRAME_WND MainFrame
Definition: console.c:48
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
#define IDM_FILE_EXIT
Definition: resource.h:15
_In_ LPCSTR lpFileName
Definition: winbase.h:3011
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