ReactOS  0.4.13-dev-563-g0561610
precomp.h
Go to the documentation of this file.
1 #ifndef __WORDPAD_PRECOMP_H
2 #define __WORDPAD_PRECOMP_H
3 
4 //#define WIN32_LEAN_AND_MEAN
5 #include <windows.h>
6 #include <windowsx.h> /* GET_X/Y_LPARAM */
7 #include <stdio.h>
8 #include <tchar.h>
9 #include <richedit.h>
10 #include <commctrl.h>
11 #include "resource.h"
12 
13 /* FIXME - add to headers !!! */
14 #ifndef SB_SIMPLEID
15 #define SB_SIMPLEID 0xFF
16 #endif
17 
18 #define MAX_KEY_LENGTH 256
19 
20 #define DOC_TYPE_RICH_TEXT 0
21 #define DOC_TYPE_UNICODE_TEXT 1
22 #define DOC_TYPE_TEXT 2
23 
24 #ifdef _MSC_VER
25 #pragma warning(disable : 4100)
26 #endif
27 
28 /* generic definitions and forward declarations */
29 struct _MAIN_WND_INFO;
30 struct _EDIT_WND_INFO;
31 
32 typedef enum _MDI_EDITOR_TYPE {
36 
37 
38 /* wordpad.c */
39 extern HINSTANCE hInstance;
40 extern HANDLE ProcessHeap;
41 
42 
43 /* editwnd.c */
44 typedef struct _OPEN_EDIT_INFO
45 {
47  union
48  {
49  UINT DocType; /* new */
50  LPTSTR lpDocumentPath; /* open */
51  };
53 
55 
56 typedef struct _EDIT_WND_INFO
57 {
58  MDI_EDITOR_TYPE MdiEditorType; /* Must be first member! */
59 
60  HWND hSelf;
62  struct _MAIN_WND_INFO *MainWnd;
63  struct _EDIT_WND_INFO *Next;
65  USHORT Zoom;
66 
67  POPEN_EDIT_INFO OpenInfo; /* Only valid during initialization */
68 
69  LONG Width;
70  LONG Height;
71 
73 
79  BOOL Setup);
80 
81 
82 /* mainwnd.c */
83 typedef struct _MENU_HINT
84 {
85  WORD CmdId;
86  UINT HintId;
88 
89 typedef struct _MAIN_WND_INFO
90 {
91  HWND hSelf;
93  HWND hStatus;
94  int nCmdShow;
95 
96  /* Editors */
100 
101  /* status flags */
104 
107 HWND CreateMainWindow(LPCTSTR lpCaption,
108  int nCmdShow);
110  LPMSG lpMsg);
112  HWND hDeactivate,
113  HWND hActivate);
115  PVOID *Info);
116 
117 
118 
119 /* misc.c */
120 INT AllocAndLoadString(OUT LPTSTR *lpTarget,
122  IN UINT uID);
123 
125  IN UINT uID,
126  OUT LPTSTR *lpTarget,
127  ...);
128 
130  IN INT PartId,
132  IN UINT uID,
133  ...);
134 
136  IN INT PartId,
138  IN UINT uID);
139 
140 INT GetTextFromEdit(OUT LPTSTR lpString,
141  IN HWND hDlg,
142  IN UINT Res);
143 
145 
146 
147 /* opensave.c */
151 
152 /* about.c */
155 
158 
159 
160 #endif /* __WORDPAD_PRECOMP_H */
BOOL MainWndTranslateMDISysAccel(HWND hwnd, LPMSG lpMsg)
Definition: mainwnd.c:1407
HINSTANCE hInstance
Definition: charmap.c:20
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define IN
Definition: typedefs.h:38
BOOL DoSaveFile(IN PWSTR pszFileName)
Definition: tftpd.h:59
const CHAR * LPCTSTR
Definition: xmlstorage.h:193
struct _OPEN_EDIT_INFO OPEN_EDIT_INFO
UINT HintId
Definition: precomp.h:87
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn BOOLEAN Physical UINT32 ACPI_TABLE_HEADER *OutTableHeader ACPI_TABLE_HEADER **OutTable ACPI_HANDLE UINT32 ACPI_WALK_CALLBACK ACPI_WALK_CALLBACK void void **ReturnValue UINT32 ACPI_BUFFER *RetPathPtr ACPI_OBJECT_HANDLER void *Data ACPI_OBJECT_HANDLER void **Data ACPI_STRING ACPI_OBJECT_LIST ACPI_BUFFER *ReturnObjectBuffer ACPI_DEVICE_INFO **ReturnBuffer ACPI_HANDLE ACPI_HANDLE ACPI_HANDLE *OutHandle ACPI_HANDLE *OutHandle void *Context void *Context ACPI_EVENT_HANDLER Handler UINT32 UINT32 ACPI_GPE_HANDLER void *Context UINT32 ACPI_NOTIFY_HANDLER void *Context ACPI_ADR_SPACE_TYPE ACPI_ADR_SPACE_HANDLER ACPI_ADR_SPACE_SETUP Setup
Definition: acpixf.h:816
enum _MDI_EDITOR_TYPE * PMDI_EDITOR_TYPE
HWND CreateMainWindow(LPCTSTR lpCaption, int nCmdShow)
Definition: mainwnd.c:920
PVOID ActiveEditor
Definition: mainwnd.h:25
UINT InMenuLoop
Definition: precomp.h:102
#define CALLBACK
Definition: compat.h:27
_In_ LPCSTR lpName
Definition: winbase.h:2729
struct _EDIT_WND_INFO * Next
Definition: imgedwnd.h:72
BOOL CreateNew
Definition: precomp.h:46
VOID SetEditorEnvironment(PEDIT_WND_INFO Info, BOOL Setup)
Definition: editwnd.c:117
UINT_PTR WPARAM
Definition: windef.h:207
INT GetTextFromEdit(OUT LPWSTR lpString, IN HWND hDlg, IN UINT Res)
Definition: misc.c:174
HINSTANCE hInst
Definition: dxdiag.c:13
VOID GetError(VOID)
Definition: misc.c:192
int32_t INT_PTR
Definition: typedefs.h:62
int32_t INT
Definition: typedefs.h:56
HWND hStatus
Definition: precomp.h:50
WPARAM wParam
Definition: combotst.c:138
CHAR * LPTSTR
Definition: xmlstorage.h:192
struct TraceInfo Info
LPTSTR lpDocumentName
Definition: precomp.h:52
BOOL InitEditWindowImpl(VOID)
Definition: editwnd.c:173
USHORT Zoom
Definition: imgedwnd.h:74
struct _EDIT_WND_INFO EDIT_WND_INFO
HWND hMdiClient
Definition: precomp.h:43
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
BOOL DoOpenFile(OUT PWSTR pszFileName)
Definition: opensave.c:36
INT AllocAndLoadString(OUT LPWSTR *lpTarget, IN HINSTANCE hInst, IN UINT uID)
Definition: misc.c:50
WORD CmdId
Definition: precomp.h:86
LONG_PTR LPARAM
Definition: windef.h:208
MDI_EDITOR_TYPE MdiEditorType
Definition: imgedwnd.h:64
POINT ScrollPos
Definition: imgedwnd.h:73
int nCmdShow
Definition: precomp.h:54
VOID UninitEditWindowImpl(VOID)
Definition: editwnd.c:198
UINT ImagesCreated
Definition: mainwnd.h:23
struct _MAIN_WND_INFO * PMAIN_WND_INFO
VOID FileInitialize(HWND hwnd)
Definition: opensave.c:8
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
HWND hStatusBar
Definition: main.cpp:35
MDI_EDITOR_TYPE MainWndGetCurrentEditor(PMAIN_WND_INFO MainWnd, PVOID *Info)
Definition: mainwnd.c:1293
BOOL StatusBarLoadString(IN HWND hStatusBar, IN INT PartId, IN HINSTANCE hInstance, IN UINT uID)
Definition: misc.c:150
DWORD LoadAndFormatString(IN HINSTANCE hInstance, IN UINT uID, OUT LPTSTR *lpTarget,...)
Definition: misc.c:86
enum _MDI_EDITOR_TYPE MDI_EDITOR_TYPE
struct _EDIT_WND_INFO * PEDIT_WND_INFO
INT_PTR CALLBACK AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
Definition: about.c:13
POPEN_EDIT_INFO OpenInfo
Definition: precomp.h:67
struct _MENU_HINT MENU_HINT
BOOL StatusBarLoadAndFormatString(IN HWND hStatusBar, IN INT PartId, IN HINSTANCE hInstance, IN UINT uID,...)
Definition: misc.c:108
#define err(...)
LPTSTR lpDocumentPath
Definition: precomp.h:50
HANDLE ProcessHeap
Definition: servman.c:15
BOOL CreateEditWindow(struct _MAIN_WND_INFO *MainWnd, POPEN_EDIT_INFO OpenInfo)
Definition: editwnd.c:132
VOID MainWndSwitchEditorContext(PMAIN_WND_INFO Info, HWND hDeactivate, HWND hActivate)
Definition: mainwnd.c:1313
unsigned short USHORT
Definition: pedump.c:61
POPEN_IMAGE_EDIT_INFO OpenInfo
Definition: imgedwnd.h:77
unsigned int UINT
Definition: ndis.h:50
struct _MAIN_WND_INFO MAIN_WND_INFO
BOOL InitMainWindowImpl(VOID)
Definition: mainwnd.c:961
UINT DocType
Definition: precomp.h:49
HWND hSelf
Definition: mainwnd.h:10
#define OUT
Definition: typedefs.h:39
struct _MAIN_WND_INFO * MainWnd
Definition: imgedwnd.h:71
struct _MENU_HINT * PMENU_HINT
HWND hEdit
Definition: precomp.h:61
struct _OPEN_EDIT_INFO * POPEN_EDIT_INFO
enum _MDI_EDITOR_TYPE MDI_EDITOR_TYPE
LPARAM lParam
Definition: combotst.c:139
PEDIT_WND_INFO ImageEditors
Definition: mainwnd.h:22
_MDI_EDITOR_TYPE
Definition: imgedwnd.h:16
INT_PTR CALLBACK NewDocSelDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
Definition: dialogs.c:4
_In_ LPCSTR lpFileName
Definition: winbase.h:3011
VOID UninitMainWindowImpl(VOID)
Definition: mainwnd.c:987