ReactOS  0.4.14-dev-845-g8381e29
mainwnd.c
Go to the documentation of this file.
1 #include "precomp.h"
2 
3 static const TCHAR szMainWndClass[] = TEXT("WordPadMainWndClass");
4 
5 #define ID_MDI_FIRSTCHILD 50000
6 #define ID_MDI_WINDOWMENU 5
7 
8 /* menu hints */
9 static const MENU_HINT MainMenuHintTable[] = {
10  /* File Menu */
22 
23  /* Window Menu */
29 };
30 
31 static const MENU_HINT SystemMenuHintTable[] = {
39 };
40 
41 
42 static VOID
44 {
45 
46 }
47 
48 static VOID CALLBACK
50  WORD cx,
51  WORD cy)
52 {
53  RECT rcClient = {0};
54  RECT rcStatus = {0};
55  HDWP dwp;
57 
58  /* Calculate the MDI client rectangle */
59  rcClient.right = cx;
60  rcClient.bottom = cy;
61 
62  if (Info->hStatus != NULL)
63  {
64  GetWindowRect(Info->hStatus,
65  &rcStatus);
66  rcClient.bottom -= (rcStatus.bottom - rcStatus.top);
67  }
68 
69 
70  dwp = BeginDeferWindowPos(2);
71  if (dwp != NULL)
72  {
73  /* Update the MDI client */
74  if (Info->hMdiClient != NULL)
75  {
76  dwp = DeferWindowPos(dwp,
77  Info->hMdiClient,
78  NULL,
79  rcClient.left,
80  rcClient.top,
81  rcClient.right - rcClient.left,
82  rcClient.bottom - rcClient.top,
83  SWP_NOZORDER);
84  if (dwp == NULL)
85  return;
86  }
87 
88  /* Update the status bar */
89  if (Info->hStatus != NULL)
90  {
91  dwp = DeferWindowPos(dwp,
92  Info->hStatus,
93  NULL,
94  0,
95  cy - (rcStatus.bottom - rcStatus.top),
96  cx,
97  rcStatus.bottom - rcStatus.top,
98  SWP_NOZORDER);
99  if (dwp == NULL)
100  return;
101  }
102 
103  EndDeferWindowPos(dwp);
104  }
105 }
106 
107 static VOID
109 {
110  CLIENTCREATESTRUCT ccs;
111  INT statwidths[] = {110, -1};
112 
113  /* FIXME - create controls and initialize the application */
114 
115  /* create the status bar */
116  Info->hStatus = CreateWindowEx(0,
118  NULL,
120  0,
121  0,
122  0,
123  0,
124  Info->hSelf,
126  hInstance,
127  NULL);
128 
129  if (Info->hStatus != NULL)
130  SendMessage(Info->hStatus,
131  SB_SETPARTS,
132  sizeof(statwidths)/sizeof(int),
133  (LPARAM)statwidths);
134 
135  /* create the MDI client window */
136  ccs.hWindowMenu = GetSubMenu(GetMenu(Info->hSelf),
140  TEXT("MDICLIENT"),
141  NULL,
143  0,
144  0,
145  0,
146  0,
147  Info->hSelf,
148  NULL,
149  hInstance,
150  &ccs);
151 
153 
154  /* initialize file open/save structure */
155  FileInitialize(Info->hSelf);
156 }
157 
158 static VOID
160  WORD CmdId,
161  HWND hControl)
162 {
163  static TCHAR szFileName[MAX_PATH];
164  static TCHAR szDocumentName[MAX_PATH];
165 
166  UNREFERENCED_PARAMETER(hControl);
167 
168  switch (CmdId)
169  {
170  case ID_NEW:
171  {
172  OPEN_EDIT_INFO OpenInfo;
173  INT Ret;
174 
175  OpenInfo.CreateNew = TRUE;
176 
179  &OpenInfo.lpDocumentName,
180  ++Info->ImagesCreated);
181 
182  Ret = DialogBox(hInstance,
184  Info->hSelf,
186  if (Ret != -1)
187  {
188  OpenInfo.DocType = Ret;
189 
191  &OpenInfo);
192  }
193 
194  }
195  break;
196 
197  case ID_BOLD:
198  MessageBox(NULL, _T("Bingo"), NULL, 0);
199  break;
200 
201  case ID_OPEN:
202  {
203  OPEN_EDIT_INFO OpenInfo;
204 
205  if (DoOpenFile(Info->hSelf,
206  szFileName, /* full file path */
207  szDocumentName)) /* file name */
208  {
209  OpenInfo.CreateNew = FALSE;
210 
211  OpenInfo.lpDocumentPath = szFileName;
212  OpenInfo.lpDocumentName = szDocumentName;
213 
215  &OpenInfo);
216  }
217 
218  }
219  break;
220 
221  case ID_EXIT:
222  SendMessage(Info->hSelf,
223  WM_CLOSE,
224  0,
225  0);
226  break;
227 
228  /* Window Menu */
229  case ID_WINDOW_TILE_HORZ:
230  SendMessage(Info->hMdiClient,
231  WM_MDITILE,
233  0);
234  break;
235 
236  case ID_WINDOW_TILE_VERT:
237  SendMessage(Info->hMdiClient,
238  WM_MDITILE,
240  0);
241  break;
242 
243  case ID_WINDOW_CASCADE:
244  SendMessage(Info->hMdiClient,
246  0,
247  0);
248  break;
249 
250  case ID_WINDOW_ARRANGE:
251  SendMessage(Info->hMdiClient,
253  0,
254  0);
255  break;
256 
257  case ID_WINDOW_NEXT:
258  SendMessage(Info->hMdiClient,
259  WM_MDINEXT,
260  0,
261  0);
262  break;
263 
264  /* Help Menu */
265  case ID_ABOUT:
268  Info->hSelf,
270  break;
271  }
272 }
273 
274 static VOID
276 {
277  /* FIXME - cleanup allocated resources */
278 }
279 
280 
281 static VOID
283 {
284  if (Info->hStatus != NULL)
285  {
286  SendMessage(Info->hStatus,
287  SB_SIMPLE,
288  (WPARAM)Info->InMenuLoop,
289  0);
290  }
291 }
292 
293 static BOOL
295  WORD CmdId,
296  const MENU_HINT *HintArray,
297  DWORD HintsCount,
298  UINT DefHintId)
299 {
300  BOOL Found = FALSE;
301  const MENU_HINT *LastHint;
302  UINT HintId = DefHintId;
303 
304  LastHint = HintArray + HintsCount;
305  while (HintArray != LastHint)
306  {
307  if (HintArray->CmdId == CmdId)
308  {
309  HintId = HintArray->HintId;
310  Found = TRUE;
311  break;
312  }
313  HintArray++;
314  }
315 
316  StatusBarLoadString(Info->hStatus,
317  SB_SIMPLEID,
318  hInstance,
319  HintId);
320 
321  return Found;
322 }
323 
324 static LRESULT CALLBACK
326  UINT uMsg,
327  WPARAM wParam,
328  LPARAM lParam)
329 {
331  LRESULT Ret = 0;
332  static RECT wndOldPos;
333 
334  /* Get the window context */
336  GWLP_USERDATA);
337  if (Info == NULL && uMsg != WM_CREATE)
338  {
339  goto HandleDefaultMessage;
340  }
341 
342  switch (uMsg)
343  {
344  case WM_CREATE:
345  {
346  Info = (PMAIN_WND_INFO)(((LPCREATESTRUCT)lParam)->lpCreateParams);
347 
348  /* Initialize the main window context */
349  Info->hSelf = hwnd;
350 
353  (LONG_PTR)Info);
354 
355  InitMainWnd(Info);
356 
357  /* Show the window */
359  Info->nCmdShow);
360  /* get the windows position */
362  &wndOldPos);
363 
364  break;
365  }
366 
367  case WM_SIZE:
368  {
370  LOWORD(lParam),
371  HIWORD(lParam));
372  /* NOTE - do *not* forward this message to DefFrameProc! Otherwise the MDI client
373  will attempt to resize itself */
374 
375  break;
376  }
377 
378  case WM_MOVE:
379  {
380 
381  }
382  break;
383 
384  case WM_NOTIFY:
385  {
386 
387  /* FIXME - handle other notifications */
388  break;
389  }
390 
391  case WM_COMMAND:
392  {
394  LOWORD(wParam),
395  (HWND)lParam);
396  goto HandleDefaultMessage;
397  }
398 
399  case WM_MENUSELECT:
400  {
401  if (Info->hStatus != NULL)
402  {
403  if (!MainWndMenuHint(Info,
404  LOWORD(wParam),
406  sizeof(MainMenuHintTable) / sizeof(MainMenuHintTable[0]),
408  {
410  LOWORD(wParam),
412  sizeof(SystemMenuHintTable) / sizeof(SystemMenuHintTable[0]),
414  }
415  }
416  break;
417  }
418 
419  case WM_ENTERMENULOOP:
420  {
421  Info->InMenuLoop = TRUE;
423  break;
424  }
425 
426  case WM_EXITMENULOOP:
427  {
428  Info->InMenuLoop = FALSE;
430  break;
431  }
432 
433  case WM_CLOSE:
434  {
436  break;
437  }
438 
439  case WM_ENABLE:
440  {
441 
442  goto HandleDefaultMessage;
443  }
444 
445  case WM_NCACTIVATE:
446  {
447 
448  goto HandleDefaultMessage;
449  }
450 
451  case WM_ACTIVATEAPP:
452  {
453 
454  goto HandleDefaultMessage;
455  }
456 
457  case WM_DESTROY:
458  {
460 
461  /* FIXME: set the windows position in registry*/
462  //wndOldPos
463 
465  0,
466  Info);
469  0);
470 
471  /* Break the message queue loop */
472  PostQuitMessage(0);
473  break;
474  }
475 
476  default:
477  {
478 HandleDefaultMessage:
479  if (Info != NULL && Info->hMdiClient != NULL)
480  {
481  Ret = DefFrameProc(hwnd,
482  Info->hMdiClient,
483  uMsg,
484  wParam,
485  lParam);
486  }
487  else
488  {
489  Ret = DefWindowProc(hwnd,
490  uMsg,
491  wParam,
492  lParam);
493  }
494  break;
495  }
496  }
497 
498  return Ret;
499 }
500 
503  PVOID *Info)
504 {
505  MDI_EDITOR_TYPE EditorType;
506 
507  if (MainWnd->ActiveEditor != NULL)
508  {
509  EditorType = *((PMDI_EDITOR_TYPE)MainWnd->ActiveEditor);
510  *Info = MainWnd->ActiveEditor;
511  }
512  else
513  {
514  EditorType = metUnknown;
515  *Info = NULL;
516  }
517 
518  return EditorType;
519 }
520 
521 VOID
523  HWND hDeactivate,
524  HWND hActivate)
525 {
526  PMDI_EDITOR_TYPE EditorType;
527 
528  /* FIXME - optimize light weight switching
529  when switching from and to an editor of same type */
530 
531  if (hDeactivate != NULL)
532  {
533  EditorType = (PMDI_EDITOR_TYPE)GetWindowLongPtr(hDeactivate,
534  GWLP_USERDATA);
535  if (EditorType != NULL)
536  {
537  switch (*EditorType)
538  {
539  case metImageEditor:
541  FALSE);
542  break;
543 
544  default:
545  break;
546  }
547 
548  Info->ActiveEditor = NULL;
549  }
550  }
551 
552  if (hActivate != NULL)
553  {
554  EditorType = (PMDI_EDITOR_TYPE)GetWindowLongPtr(hActivate,
555  GWLP_USERDATA);
556  if (EditorType != NULL)
557  {
558  Info->ActiveEditor = EditorType;
559 
560  switch (*EditorType)
561  {
562  case metImageEditor:
564  TRUE);
565  break;
566 
567  default:
568  break;
569  }
570  }
571  }
572 }
573 
574 HWND
576  int nCmdShow)
577 {
579  HWND hMainWnd = NULL;
580 
582  0,
583  sizeof(MAIN_WND_INFO));
584  if (Info != NULL)
585  {
587  sizeof(MAIN_WND_INFO));
588  Info->nCmdShow = nCmdShow;
589 
590  /* FIXME - load the window position from the registry */
591 
594  lpCaption,
600  NULL,
601  NULL,
602  hInstance,
603  Info);
604  if (hMainWnd == NULL)
605  {
607  0,
608  Info);
609  }
610  }
611 
612  return hMainWnd;
613 }
614 
615 BOOL
617  LPMSG lpMsg)
618 {
620 
621  /* Get the window context */
623  GWLP_USERDATA);
624  if (Info != NULL && Info->hMdiClient != NULL)
625  {
626  return TranslateMDISysAccel(Info->hMdiClient,
627  lpMsg);
628  }
629 
630  return FALSE;
631 }
632 
633 BOOL
635 {
636  WNDCLASSEX wc = {0};
637 
638  wc.cbSize = sizeof(WNDCLASSEX);
640  wc.hInstance = hInstance;
641  wc.hIcon = LoadIcon(hInstance,
643  wc.hCursor = LoadCursor(NULL,
644  IDC_ARROW);
645  wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
650  IMAGE_ICON,
651  16,
652  16,
653  LR_SHARED);
654 
655  return RegisterClassEx(&wc) != (ATOM)0;
656 }
657 
658 VOID
660 {
662  hInstance);
663 }
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define IDS_HINT_EXIT
Definition: resource.h:96
#define IDS_HINT_BLANK
Definition: resource.h:94
#define IDI_ICON
Definition: resource.h:5
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define WS_EX_WINDOWEDGE
Definition: winuser.h:407
#define IDR_MAINMENU
Definition: resource.h:40
MDI_EDITOR_TYPE MainWndGetCurrentEditor(PMAIN_WND_INFO MainWnd, PVOID *Info)
Definition: mainwnd.c:1293
static HICON
Definition: imagelist.c:84
static LRESULT CALLBACK MainWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: mainwnd.c:325
HDWP WINAPI BeginDeferWindowPos(_In_ int)
LPCSTR lpszMenuName
Definition: winuser.h:3185
#define TRUE
Definition: types.h:120
const CHAR * LPCTSTR
Definition: xmlstorage.h:193
#define LR_SHARED
Definition: winuser.h:1090
#define IMAGE_ICON
Definition: winuser.h:212
#define IDC_STATUSBAR
Definition: resource.h:14
#define RegisterClassEx
Definition: winuser.h:5812
#define SC_RESTORE
Definition: winuser.h:2573
UINT HintId
Definition: precomp.h:87
HCURSOR hCursor
Definition: winuser.h:3183
WNDPROC lpfnWndProc
Definition: winuser.h:3178
static const MENU_HINT SystemMenuHintTable[]
Definition: mainwnd.c:31
LPCSTR lpszClassName
Definition: winuser.h:3186
WORD ATOM
Definition: dimm.idl:113
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
static VOID CALLBACK MainWndResize(PVOID Context, WORD cx, WORD cy)
Definition: mainwnd.c:49
#define WM_MDICASCADE
Definition: winuser.h:1801
PVOID ActiveEditor
Definition: mainwnd.h:25
#define CALLBACK
Definition: compat.h:27
#define ID_BOLD
Definition: resource.h:50
LONG top
Definition: windef.h:307
BOOL CreateNew
Definition: precomp.h:46
#define IDS_HINT_SAVE
Definition: resource.h:105
#define ZeroMemory
Definition: winbase.h:1642
#define WM_MOVE
Definition: winuser.h:1592
static BOOL MainWndMenuHint(PMAIN_WND_INFO Info, WORD CmdId, const MENU_HINT *HintArray, DWORD HintsCount, UINT DefHintId)
Definition: mainwnd.c:294
static const TCHAR szMainWndClass[]
Definition: mainwnd.c:3
static VOID MainWndCommand(PMAIN_WND_INFO Info, WORD CmdId, HWND hControl)
Definition: mainwnd.c:159
UINT_PTR WPARAM
Definition: windef.h:207
#define ID_MDI_WINDOWMENU
Definition: mainwnd.c:6
#define ID_WINDOW_TILE_VERT
Definition: resource.h:49
#define WS_CHILD
Definition: pedump.c:617
HICON hIconSm
Definition: winuser.h:3187
LONG left
Definition: windef.h:306
#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
#define STATUSCLASSNAME
Definition: commctrl.h:1935
BOOL WINAPI DestroyWindow(_In_ HWND)
int32_t INT
Definition: typedefs.h:56
#define SetWindowLongPtr
Definition: treelist.c:70
WPARAM wParam
Definition: combotst.c:138
#define ID_PRINTPRE
Definition: resource.h:27
struct TraceInfo Info
#define IDS_HINT_SYS_MINIMIZE
Definition: resource.h:123
#define WM_ENABLE
Definition: winuser.h:1597
#define DefFrameProc
Definition: ros2win.h:32
VOID FileInitialize(IN HWND hwnd)
Definition: opensave.c:13
LPTSTR lpDocumentName
Definition: precomp.h:52
#define IDS_HINT_OPEN
Definition: resource.h:102
static VOID DestroyMainWnd(PMAIN_WND_INFO Info)
Definition: mainwnd.c:275
#define DialogBox
Definition: winuser.h:5736
#define WM_MDIICONARRANGE
Definition: winuser.h:1802
#define ID_MDI_FIRSTCHILD
Definition: mainwnd.c:5
static VOID InitMainWnd(PMAIN_WND_INFO Info)
Definition: mainwnd.c:108
#define WM_NCACTIVATE
Definition: winuser.h:1670
HINSTANCE hInstance
Definition: winuser.h:3181
unsigned int BOOL
Definition: ntddk_ex.h:94
static VOID DoOpenFile(PINFO pInfo)
Definition: connectdialog.c:34
#define ID_BLANK
Definition: resource.h:43
#define WM_ENTERMENULOOP
Definition: winuser.h:1786
#define IDD_ABOUTBOX
Definition: resource.h:8
#define MDITILE_HORIZONTAL
Definition: winuser.h:2163
BOOL WINAPI EndDeferWindowPos(_In_ HDWP)
#define WM_MENUSELECT
Definition: winuser.h:1729
static const MENU_HINT MainMenuHintTable[]
Definition: mainwnd.c:9
#define SB_SIMPLEID
Definition: precomp.h:15
#define CreateWindowEx
Definition: winuser.h:5730
#define SC_MAXIMIZE
Definition: winuser.h:2563
#define CW_USEDEFAULT
Definition: winuser.h:225
#define GWLP_USERDATA
Definition: treelist.c:63
#define SB_SIMPLE
Definition: commctrl.h:1954
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:581
WORD CmdId
Definition: precomp.h:86
#define WM_EXITMENULOOP
Definition: winuser.h:1787
smooth NULL
Definition: ftsmooth.c:416
#define WM_MDINEXT
Definition: winuser.h:1798
LONG_PTR LPARAM
Definition: windef.h:208
UINT cbSize
Definition: winuser.h:3176
#define CCS_NOPARENTALIGN
Definition: commctrl.h:2242
DWORD LoadAndFormatString(IN HINSTANCE hInstance, IN UINT uID, OUT LPTSTR *lpTarget,...)
Definition: misc.c:86
#define ID_ABOUT
Definition: charmap.c:18
static INT_PTR CALLBACK AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
Definition: about.c:15
return Found
Definition: dirsup.c:1270
#define IDS_HINT_PRINT
Definition: resource.h:107
#define ID_SAVEAS
Definition: resource.h:26
HBRUSH hbrBackground
Definition: winuser.h:3184
#define DefWindowProc
Definition: ros2win.h:31
#define WM_DESTROY
Definition: winuser.h:1591
#define ID_WINDOW_CASCADE
Definition: resource.h:79
char TCHAR
Definition: xmlstorage.h:189
#define IDS_HINT_SYS_MOVE
Definition: resource.h:121
BOOL CreateEditWindow(struct _MAIN_WND_INFO *MainWnd, POPEN_EDIT_INFO OpenInfo)
Definition: editwnd.c:132
BOOL MainWndTranslateMDISysAccel(HWND hwnd, LPMSG lpMsg)
Definition: mainwnd.c:1407
#define _T(x)
Definition: vfdio.h:22
#define ID_CLOSE
Definition: resource.h:23
HDWP WINAPI DeferWindowPos(_In_ HDWP, _In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define SBARS_SIZEGRIP
Definition: commctrl.h:1919
#define WM_SIZE
Definition: winuser.h:1593
#define MDITILE_VERTICAL
Definition: winuser.h:2164
#define IDS_HINT_NEXT
Definition: resource.h:121
#define IDS_HINT_CLOSE
Definition: resource.h:103
#define ID_OPEN
Definition: resource.h:22
#define IDS_HINT_CLOSEALL
Definition: resource.h:104
#define WM_CLOSE
Definition: winuser.h:1603
#define MAX_PATH
Definition: compat.h:26
struct _MAIN_WND_INFO * PMAIN_WND_INFO
unsigned short WORD
Definition: ntddk_ex.h:93
#define IDS_HINT_SYS_RESTORE
Definition: resource.h:120
unsigned long DWORD
Definition: ntddk_ex.h:95
VOID UninitMainWindowImpl(VOID)
Definition: mainwnd.c:987
#define ID_SAVE
Definition: resource.h:25
#define WS_HSCROLL
Definition: pedump.c:628
#define IDS_HINT_CASCADE
Definition: resource.h:117
#define IDS_HINT_SYS_SIZE
Definition: resource.h:122
#define ID_WINDOW_TILE_HORZ
Definition: resource.h:48
HWND hMainWnd
Definition: magnifier.c:32
HICON hIcon
Definition: winuser.h:3182
enum _MDI_EDITOR_TYPE MDI_EDITOR_TYPE
#define COLOR_BTNFACE
Definition: winuser.h:918
#define IDS_HINT_PRINTPRE
Definition: resource.h:108
#define IDS_HINT_ARRANGE
Definition: resource.h:120
#define ID_NEW
Definition: resource.h:21
#define MessageBox
Definition: winuser.h:5797
INT_PTR CALLBACK NewDocSelDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
Definition: dialogs.c:4
#define ID_PAGESETUP
Definition: resource.h:21
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
#define WM_COMMAND
Definition: winuser.h:1722
LPTSTR lpDocumentPath
Definition: precomp.h:50
static VOID UpdateMainStatusBar(PMAIN_WND_INFO Info)
Definition: mainwnd.c:282
#define ID_WINDOW_ARRANGE
Definition: resource.h:52
#define LoadCursor
Definition: winuser.h:5787
#define ID_EXIT
Definition: resource.h:10
HANDLE ProcessHeap
Definition: servman.c:15
#define SC_MINIMIZE
Definition: winuser.h:2561
#define IDD_NEWDOCSEL
Definition: resource.h:92
#define TEXT(s)
Definition: k32.h:26
#define ID_PRINT
Definition: wordpad.h:39
#define WM_ACTIVATEAPP
Definition: winuser.h:1614
#define IDS_HINT_SAVEAS
Definition: resource.h:106
#define WS_EX_CLIENTEDGE
Definition: winuser.h:384
#define ID_WINDOW_NEXT
Definition: resource.h:51
#define IDS_HINT_TILE_VERT
Definition: resource.h:119
HINSTANCE hInstance
Definition: mainwnd.c:15
#define SC_SIZE
Definition: winuser.h:2559
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned int UINT
Definition: ndis.h:50
#define WS_VSCROLL
Definition: pedump.c:627
#define IDS_HINT_SYS_MAXIMIZE
Definition: resource.h:124
#define SB_SETPARTS
Definition: commctrl.h:1950
#define IDC_ARROW
Definition: winuser.h:682
UINT DocType
Definition: precomp.h:49
#define SC_MOVE
Definition: winuser.h:2560
_Out_opt_ int * cx
Definition: commctrl.h:581
#define SC_CLOSE
Definition: winuser.h:2567
#define SendMessage
Definition: winuser.h:5818
#define WM_CREATE
Definition: winuser.h:1590
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
#define HIWORD(l)
Definition: typedefs.h:246
#define ID_CLOSEALL
Definition: resource.h:24
LONG bottom
Definition: windef.h:309
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define LoadImage
Definition: winuser.h:5790
static VOID CreateToolbars(PMAIN_WND_INFO Info)
Definition: mainwnd.c:43
#define IDS_HINT_TILE_HORZ
Definition: resource.h:118
WNDCLASSEXA WNDCLASSEX
Definition: winuser.h:5694
#define SC_NEXTWINDOW
Definition: winuser.h:2565
#define LoadIcon
Definition: winuser.h:5788
#define GetWindowLongPtr
Definition: treelist.c:73
#define IDS_HINT_PAGESETUP
Definition: resource.h:57
enum _MDI_EDITOR_TYPE * PMDI_EDITOR_TYPE
BOOL InitMainWindowImpl(VOID)
Definition: mainwnd.c:961
#define WS_EX_ACCEPTFILES
Definition: pedump.c:648
LONG_PTR LRESULT
Definition: windef.h:209
#define IDS_DEFAULT_NAME
Definition: resource.h:8
#define WS_VISIBLE
Definition: pedump.c:620
#define UnregisterClass
Definition: winuser.h:5836
HMENU WINAPI GetMenu(_In_ HWND)
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
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
VOID MainWndSwitchEditorContext(PMAIN_WND_INFO Info, HWND hDeactivate, HWND hActivate)
Definition: mainwnd.c:1313
VOID SetEditorEnvironment(PEDIT_WND_INFO Info, BOOL Setup)
Definition: editwnd.c:117
BOOL WINAPI TranslateMDISysAccel(_In_ HWND, _In_ LPMSG)
#define WM_NOTIFY
Definition: richedit.h:61
BOOL StatusBarLoadString(IN HWND hStatusBar, IN INT PartId, IN HINSTANCE hInstance, IN UINT uID)
Definition: misc.c:150
HWND CreateMainWindow(LPCTSTR lpCaption, int nCmdShow)
Definition: mainwnd.c:920
#define WM_MDITILE
Definition: winuser.h:1800
#define IDS_HINT_NEW
Definition: resource.h:101