ReactOS 0.4.16-dev-197-g92996da
precomp.h File Reference
#include <windows.h>
#include <windowsx.h>
#include <stdio.h>
#include <tchar.h>
#include <richedit.h>
#include <commctrl.h>
#include "resource.h"
Include dependency graph for precomp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _OPEN_EDIT_INFO
 
struct  _EDIT_WND_INFO
 
struct  _MENU_HINT
 
struct  _MAIN_WND_INFO
 

Macros

#define SB_SIMPLEID   0xFF
 
#define MAX_KEY_LENGTH   256
 
#define DOC_TYPE_RICH_TEXT   0
 
#define DOC_TYPE_UNICODE_TEXT   1
 
#define DOC_TYPE_TEXT   2
 

Typedefs

typedef enum _MDI_EDITOR_TYPE MDI_EDITOR_TYPE
 
typedef enum _MDI_EDITOR_TYPEPMDI_EDITOR_TYPE
 
typedef struct _OPEN_EDIT_INFO OPEN_EDIT_INFO
 
typedef struct _OPEN_EDIT_INFOPOPEN_EDIT_INFO
 
typedef struct _EDIT_WND_INFO EDIT_WND_INFO
 
typedef struct _EDIT_WND_INFOPEDIT_WND_INFO
 
typedef struct _MENU_HINT MENU_HINT
 
typedef struct _MENU_HINTPMENU_HINT
 
typedef struct _MAIN_WND_INFO MAIN_WND_INFO
 
typedef struct _MAIN_WND_INFOPMAIN_WND_INFO
 

Enumerations

enum  _MDI_EDITOR_TYPE { metUnknown = 0 , metImageEditor }
 

Functions

BOOL InitEditWindowImpl (VOID)
 
VOID UninitEditWindowImpl (VOID)
 
BOOL CreateEditWindow (struct _MAIN_WND_INFO *MainWnd, POPEN_EDIT_INFO OpenInfo)
 
VOID SetEditorEnvironment (PEDIT_WND_INFO Info, BOOL Setup)
 
BOOL InitMainWindowImpl (VOID)
 
VOID UninitMainWindowImpl (VOID)
 
HWND CreateMainWindow (LPCTSTR lpCaption, int nCmdShow)
 
BOOL MainWndTranslateMDISysAccel (HWND hwnd, LPMSG lpMsg)
 
VOID MainWndSwitchEditorContext (PMAIN_WND_INFO Info, HWND hDeactivate, HWND hActivate)
 
MDI_EDITOR_TYPE MainWndGetCurrentEditor (PMAIN_WND_INFO MainWnd, PVOID *Info)
 
INT AllocAndLoadString (OUT LPTSTR *lpTarget, IN HINSTANCE hInst, IN UINT uID)
 
DWORD LoadAndFormatString (IN HINSTANCE hInstance, IN UINT uID, OUT LPTSTR *lpTarget,...)
 
BOOL StatusBarLoadAndFormatString (IN HWND hStatusBar, IN INT PartId, IN HINSTANCE hInstance, IN UINT uID,...)
 
BOOL StatusBarLoadString (IN HWND hStatusBar, IN INT PartId, IN HINSTANCE hInstance, IN UINT uID)
 
INT GetTextFromEdit (OUT LPTSTR lpString, IN HWND hDlg, IN UINT Res)
 
VOID GetError (DWORD err)
 
VOID FileInitialize (HWND hwnd)
 
BOOL DoOpenFile (HWND hwnd, LPTSTR lpFileName, LPTSTR lpName)
 
BOOL DoSaveFile (HWND hwnd)
 
INT_PTR CALLBACK AboutDialogProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
 
INT_PTR CALLBACK NewDocSelDlgProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
 

Variables

HINSTANCE hInstance
 
HANDLE ProcessHeap
 

Macro Definition Documentation

◆ DOC_TYPE_RICH_TEXT

#define DOC_TYPE_RICH_TEXT   0

Definition at line 20 of file precomp.h.

◆ DOC_TYPE_TEXT

#define DOC_TYPE_TEXT   2

Definition at line 22 of file precomp.h.

◆ DOC_TYPE_UNICODE_TEXT

#define DOC_TYPE_UNICODE_TEXT   1

Definition at line 21 of file precomp.h.

◆ MAX_KEY_LENGTH

#define MAX_KEY_LENGTH   256

Definition at line 18 of file precomp.h.

◆ SB_SIMPLEID

#define SB_SIMPLEID   0xFF

Definition at line 15 of file precomp.h.

Typedef Documentation

◆ EDIT_WND_INFO

◆ MAIN_WND_INFO

◆ MDI_EDITOR_TYPE

◆ MENU_HINT

◆ OPEN_EDIT_INFO

◆ PEDIT_WND_INFO

◆ PMAIN_WND_INFO

◆ PMDI_EDITOR_TYPE

◆ PMENU_HINT

◆ POPEN_EDIT_INFO

Enumeration Type Documentation

◆ _MDI_EDITOR_TYPE

Enumerator
metUnknown 
metImageEditor 

Definition at line 32 of file precomp.h.

32 {
33 metUnknown = 0,
enum _MDI_EDITOR_TYPE MDI_EDITOR_TYPE
@ metUnknown
Definition: precomp.h:33
@ metImageEditor
Definition: precomp.h:34
enum _MDI_EDITOR_TYPE * PMDI_EDITOR_TYPE

Function Documentation

◆ AboutDialogProc()

INT_PTR CALLBACK AboutDialogProc ( HWND  hDlg,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 4 of file about.c.

8{
9 HWND hLicenseEditWnd;
11 TCHAR strLicense[700];
12
13 switch (message)
14 {
15 case WM_INITDIALOG:
16
20 16,
21 16,
22 0);
23
24 SendMessage(hDlg,
25 WM_SETICON,
27 (LPARAM)hIcon);
28
29 hLicenseEditWnd = GetDlgItem(hDlg,
31
34 strLicense,
35 sizeof(strLicense) / sizeof(TCHAR));
36
37 SetWindowText(hLicenseEditWnd,
38 strLicense);
39 return TRUE;
40
41 case WM_COMMAND:
42 if ((LOWORD(wParam) == IDOK) || (LOWORD(wParam) == IDCANCEL))
43 {
45 EndDialog(hDlg,
46 LOWORD(wParam));
47 return TRUE;
48 }
49
50 break;
51 }
52
53 return FALSE;
54}
#define IDC_LICENSE_EDIT
Definition: resource.h:20
#define IDI_ICON
Definition: resource.h:5
#define IDS_LICENSE
Definition: resource.h:28
HINSTANCE hInstance
Definition: charmap.c:19
WPARAM wParam
Definition: combotst.c:138
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static HICON
Definition: imagelist.c:80
HICON hIcon
Definition: msconfig.c:44
#define LOWORD(l)
Definition: pedump.c:82
Definition: tftpd.h:60
#define ICON_SMALL
Definition: tnclass.cpp:48
LONG_PTR LPARAM
Definition: windef.h:208
#define IDCANCEL
Definition: winuser.h:834
#define IMAGE_ICON
Definition: winuser.h:212
#define WM_COMMAND
Definition: winuser.h:1743
#define WM_INITDIALOG
Definition: winuser.h:1742
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define IDOK
Definition: winuser.h:833
#define SendMessage
Definition: winuser.h:5855
#define LoadImage
Definition: winuser.h:5827
#define LoadString
Definition: winuser.h:5831
#define SetWindowText
Definition: winuser.h:5869
#define MAKEINTRESOURCE
Definition: winuser.h:591
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2105
char TCHAR
Definition: xmlstorage.h:189

◆ AllocAndLoadString()

INT AllocAndLoadString ( OUT LPTSTR lpTarget,
IN HINSTANCE  hInst,
IN UINT  uID 
)

Definition at line 59 of file misc.c.

62{
63 INT ln;
64
66 uID);
67 if (ln++ > 0)
68 {
69 (*lpTarget) = (LPWSTR)LocalAlloc(LMEM_FIXED,
70 ln * sizeof(TCHAR));
71 if ((*lpTarget) != NULL)
72 {
73 INT Ret;
74 if (!(Ret = LoadString(hInst, uID, *lpTarget, ln)))
75 {
76 LocalFree((HLOCAL)(*lpTarget));
77 }
78 return Ret;
79 }
80 }
81 return 0;
82}
INT LengthOfStrResource(IN HINSTANCE hInst, IN UINT uID)
Definition: misc.c:23
HINSTANCE hInst
Definition: dxdiag.c:13
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:1390
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1594
int32_t INT
Definition: typedefs.h:58
#define LMEM_FIXED
Definition: winbase.h:393
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by _tWinMain(), AboutDialogProc(), AddToolbarButton(), ChangeListViewText(), CreateApplicationWindow(), DoCreate(), DoDeleteService(), DoOpenFile(), DoSaveFile(), FontWndProc(), FrameOnCommand(), InitDialog(), InitRecoveryPage(), LoadAndFormatString(), NewDocSelDlgProc(), OnCreate(), ResetProgressDialog(), SetServiceStatusText(), SetStartupType(), StatusBarLoadAndFormatString(), StatusBarLoadString(), TV1_AddDependantsToTree(), TV2_AddDependantsToTree(), UpdateServiceCount(), VarListLoadAndFormatString(), and wWinMain().

◆ CreateEditWindow()

BOOL CreateEditWindow ( struct _MAIN_WND_INFO MainWnd,
POPEN_EDIT_INFO  OpenInfo 
)

Definition at line 132 of file editwnd.c.

134{
136 HWND hWndEditor;
137
139 0,
140 sizeof(EDIT_WND_INFO));
141 if (Info != NULL)
142 {
144 sizeof(EDIT_WND_INFO));
145 Info->MainWnd = MainWnd;
146 Info->MdiEditorType = metImageEditor;
147 Info->OpenInfo = OpenInfo;
148
149 hWndEditor = CreateMDIWindow(szEditWndClass,
150 OpenInfo->lpDocumentName,
156 MainWnd->hMdiClient,
157 hInstance,
158 (LPARAM)Info);
159
160 if (hWndEditor != NULL)
161 return TRUE;
162
163
165 0,
166 Info);
167 }
168
169 return FALSE;
170}
HANDLE ProcessHeap
Definition: servman.c:15
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
static const TCHAR szEditWndClass[]
Definition: editwnd.c:3
#define WS_MAXIMIZE
Definition: pedump.c:623
HWND hMdiClient
Definition: precomp.h:43
LPTSTR lpDocumentName
Definition: precomp.h:52
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
Definition: wdfchildlist.h:690
#define ZeroMemory
Definition: winbase.h:1736
#define CreateMDIWindow
Definition: winuser.h:5765
#define CW_USEDEFAULT
Definition: winuser.h:225

Referenced by MainWndCommand().

◆ CreateMainWindow()

HWND CreateMainWindow ( LPCTSTR  lpCaption,
int  nCmdShow 
)

Definition at line 923 of file mainwnd.c.

925{
928
931 sizeof(MAIN_WND_INFO));
932
933 if (Info != NULL)
934 {
935 Info->nCmdShow = nCmdShow;
936
939 lpCaption,
943 680,
944 450,
945 NULL,
946 NULL,
947 hInstance,
948 Info);
949 if (hMainWnd == NULL)
950 {
951 //int ret;
952 //ret = GetLastError();
953 GetError();
955 0,
956 Info);
957 }
958 }
959
960 return hMainWnd;
961}
static const WCHAR szMainWndClass[]
Definition: mainwnd.c:15
VOID GetError(VOID)
Definition: misc.c:192
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
HWND hMainWnd
Definition: magnifier.c:32
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define WS_CLIPCHILDREN
Definition: pedump.c:619
#define CreateWindowEx
Definition: winuser.h:5767
#define WS_EX_WINDOWEDGE
Definition: winuser.h:407

◆ DoOpenFile()

BOOL DoOpenFile ( HWND  hwnd,
LPTSTR  lpFileName,
LPTSTR  lpName 
)

Definition at line 27 of file opensave.c.

30{
31 DWORD err;
32
33 static TCHAR Filter[] = _T("All documents (*.txt,*.rtf)\0*.txt;*.rtf\0") \
34 _T("Rich Text Document (*.rtf)\0*.rtf\0") \
35 _T("Text Document (*.txt)\0*.txt\0");
36
37
39 ofn.lpstrFile = szFileName;
40 ofn.lpstrFileTitle = szTitleName;
42
43 if (GetOpenFileName(&ofn))
44 {
45 return TRUE;
46 }
47
49
51 MessageBox(NULL, _T("Open file failed"), NULL, 0);
52
53 return FALSE;
54}
static OPENFILENAMEW ofn
Definition: opensave.c:10
#define CDERR_GENERALCODES
Definition: cderr.h:5
DWORD WINAPI CommDlgExtendedError(void)
Definition: cdlg32.c:148
#define OFN_EXPLORER
Definition: commdlg.h:104
#define OFN_HIDEREADONLY
Definition: commdlg.h:107
#define OFN_FILEMUSTEXIST
Definition: commdlg.h:106
#define GetOpenFileName
Definition: commdlg.h:665
unsigned long DWORD
Definition: ntddk_ex.h:95
_Must_inspect_result_ _In_opt_ PFLT_FILTER Filter
Definition: fltkernel.h:1801
#define err(...)
DWORD Flags
Definition: commdlg.h:373
LPWSTR lpstrFile
Definition: commdlg.h:367
LPWSTR lpstrFileTitle
Definition: commdlg.h:369
LPCWSTR lpstrFilter
Definition: commdlg.h:363
#define _T(x)
Definition: vfdio.h:22
#define MessageBox
Definition: winuser.h:5834

◆ DoSaveFile()

BOOL DoSaveFile ( HWND  hwnd)

Definition at line 59 of file opensave.c.

60{
61 TCHAR szFileName[MAX_PATH] = _T("");
62 static TCHAR Filter[] = _T("Rich Text Document (*.rtf)\0*.rtf\0") \
63 _T("Text Document (*.txt)\0*.txt\0");
64
66 ofn.lpstrFile = szFileName;
68
69 if (GetSaveFileName(&ofn))
70 {
71 if (DoWriteFile(szFileName))
72 return TRUE;
73 }
74
76 MessageBox(NULL, _T("Save to file failed"), NULL, 0);
77
78 return FALSE;
79}
#define OFN_OVERWRITEPROMPT
Definition: commdlg.h:116
#define GetSaveFileName
Definition: commdlg.h:666
#define OFN_PATHMUSTEXIST
Definition: commdlg.h:117
#define MAX_PATH
Definition: compat.h:34
static BOOL DoWriteFile(LPCTSTR pszFileName)
Definition: opensave.c:20

◆ FileInitialize()

VOID FileInitialize ( HWND  hwnd)

Definition at line 8 of file opensave.c.

9{
10 ZeroMemory(&ofn, sizeof(ofn));
15 ofn.lpstrDefExt = _T("bmp");
16}
OPENFILENAMEA OPENFILENAME
Definition: commdlg.h:657
HWND hwndOwner
Definition: commdlg.h:361
DWORD nMaxFileTitle
Definition: commdlg.h:370
LPCWSTR lpstrDefExt
Definition: commdlg.h:376
DWORD lStructSize
Definition: commdlg.h:360
DWORD nMaxFile
Definition: commdlg.h:368
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023

◆ GetError()

VOID GetError ( DWORD  err)

Definition at line 183 of file misc.c.

184{
185 LPVOID lpMsgBuf;
186
187 if (err == 0)
188 err = GetLastError();
189
193 NULL,
194 err,
196 (LPTSTR) &lpMsgBuf,
197 0,
198 NULL );
199
200 MessageBox(NULL, (LPCTSTR) lpMsgBuf, _T("Error!"), MB_OK | MB_ICONERROR);
201
202 LocalFree(lpMsgBuf);
203}
#define LANG_NEUTRAL
Definition: nls.h:22
#define MAKELANGID(p, s)
Definition: nls.h:15
#define SUBLANG_DEFAULT
Definition: nls.h:168
#define FormatMessage
Definition: winbase.h:3819
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define FORMAT_MESSAGE_IGNORE_INSERTS
Definition: winbase.h:445
#define FORMAT_MESSAGE_FROM_SYSTEM
Definition: winbase.h:448
#define FORMAT_MESSAGE_ALLOCATE_BUFFER
Definition: winbase.h:444
#define MB_ICONERROR
Definition: winuser.h:790
#define MB_OK
Definition: winuser.h:793
const CHAR * LPCTSTR
Definition: xmlstorage.h:193
CHAR * LPTSTR
Definition: xmlstorage.h:192

◆ GetTextFromEdit()

INT GetTextFromEdit ( OUT LPTSTR  lpString,
IN HWND  hDlg,
IN UINT  Res 
)

Definition at line 164 of file misc.c.

167{
169 if(len > 0)
170 {
171 GetDlgItemText(hDlg,
172 Res,
173 lpString,
174 len + 1);
175 }
176 else
177 lpString = NULL;
178
179 return len;
180}
GLenum GLsizei len
Definition: glext.h:6722
#define GetWindowTextLength
Definition: winuser.h:5811
#define GetDlgItemText
Definition: winuser.h:5797

◆ InitEditWindowImpl()

BOOL InitEditWindowImpl ( VOID  )

Definition at line 173 of file editwnd.c.

174{
175 WNDCLASSEX wc = {0};
176
177 wc.cbSize = sizeof(WNDCLASSEX);
179 wc.hInstance = hInstance;
183 IDC_ARROW);
184 wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
185 wc.lpszMenuName = NULL;
190 16,
191 16,
192 LR_SHARED);
193
194 return RegisterClassEx(&wc) != (ATOM)0;
195}
WORD ATOM
Definition: dimm.idl:113
static LRESULT CALLBACK EditWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: editwnd.c:50
HINSTANCE hInstance
Definition: winuser.h:3209
HCURSOR hCursor
Definition: winuser.h:3211
LPCSTR lpszMenuName
Definition: winuser.h:3213
HICON hIconSm
Definition: winuser.h:3215
UINT cbSize
Definition: winuser.h:3204
WNDPROC lpfnWndProc
Definition: winuser.h:3206
LPCSTR lpszClassName
Definition: winuser.h:3214
HICON hIcon
Definition: winuser.h:3210
HBRUSH hbrBackground
Definition: winuser.h:3212
#define IDC_ARROW
Definition: winuser.h:687
#define RegisterClassEx
Definition: winuser.h:5849
#define LoadIcon
Definition: winuser.h:5825
#define LoadCursor
Definition: winuser.h:5824
WNDCLASSEXA WNDCLASSEX
Definition: winuser.h:5731
#define LR_SHARED
Definition: winuser.h:1103
#define COLOR_BTNFACE
Definition: winuser.h:931

Referenced by _tWinMain().

◆ InitMainWindowImpl()

BOOL InitMainWindowImpl ( VOID  )

Definition at line 964 of file mainwnd.c.

965{
966 WNDCLASSEX wc = {0};
967
968 wc.cbSize = sizeof(WNDCLASSEX);
970 wc.hInstance = hInstance;
974 IDC_ARROW);
975 wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
981 16,
982 16,
983 LR_SHARED);
984
985 return RegisterClassEx(&wc) != (ATOM)0;
986}
#define IDR_MAINMENU
Definition: resource.h:40
static LRESULT CALLBACK MainWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: mainwnd.c:639
#define IDI_SM_ICON
Definition: resource.h:64

Referenced by _tWinMain(), and wWinMain().

◆ LoadAndFormatString()

DWORD LoadAndFormatString ( IN HINSTANCE  hInstance,
IN UINT  uID,
OUT LPTSTR lpTarget,
  ... 
)

Definition at line 85 of file misc.c.

89{
90 DWORD Ret = 0;
92 va_list lArgs;
93
96 uID) != 0)
97 {
98 va_start(lArgs, lpTarget);
99 /* let's use FormatMessage to format it because it has the ability to allocate
100 memory automatically */
102 lpFormat,
103 0,
104 0,
105 (LPTSTR)lpTarget,
106 0,
107 &lArgs);
108 va_end(lArgs);
109
111 }
112
113 return Ret;
114}
char * va_list
Definition: acmsvcex.h:78
#define va_end(ap)
Definition: acmsvcex.h:90
#define va_start(ap, A)
Definition: acmsvcex.h:91
INT AllocAndLoadString(OUT LPTSTR *lpTarget, IN HINSTANCE hInst, IN UINT uID)
Definition: misc.c:59
LPCWSTR lpFormat
Definition: trayclock.cpp:32
#define FORMAT_MESSAGE_FROM_STRING
Definition: winbase.h:446

Referenced by CreateFontWindow(), CreateNewConsoleTitle(), EditSecurity(), FontWndProc(), GetDisplayStringFromSidRequestResult(), GetPrincipalAccountNameString(), MainWndCommand(), and UpdateControlStates().

◆ MainWndGetCurrentEditor()

MDI_EDITOR_TYPE MainWndGetCurrentEditor ( PMAIN_WND_INFO  MainWnd,
PVOID Info 
)

Definition at line 502 of file mainwnd.c.

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}
PVOID ActiveEditor
Definition: precomp.h:99

◆ MainWndSwitchEditorContext()

VOID MainWndSwitchEditorContext ( PMAIN_WND_INFO  Info,
HWND  hDeactivate,
HWND  hActivate 
)

Definition at line 522 of file mainwnd.c.

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,
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,
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}
VOID SetEditorEnvironment(PEDIT_WND_INFO Info, BOOL Setup)
Definition: editwnd.c:117
#define GetWindowLongPtr
Definition: treelist.c:73
#define GWLP_USERDATA
Definition: treelist.c:63

◆ MainWndTranslateMDISysAccel()

BOOL MainWndTranslateMDISysAccel ( HWND  hwnd,
LPMSG  lpMsg 
)

Definition at line 616 of file mainwnd.c.

618{
620
621 /* Get the window context */
624 if (Info != NULL && Info->hMdiClient != NULL)
625 {
626 return TranslateMDISysAccel(Info->hMdiClient,
627 lpMsg);
628 }
629
630 return FALSE;
631}
struct _MAIN_WND_INFO * PMAIN_WND_INFO
BOOL WINAPI TranslateMDISysAccel(_In_ HWND, _In_ LPMSG)

Referenced by _tWinMain().

◆ NewDocSelDlgProc()

INT_PTR CALLBACK NewDocSelDlgProc ( HWND  hDlg,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 4 of file dialogs.c.

8{
9 switch (message)
10 {
11 static HWND hList;
12
13 case WM_INITDIALOG:
14 {
15 LPTSTR lpDocType;
16 INT i;
17
18 hList = GetDlgItem(hDlg,
19 IDC_LIST);
20
22 {
23 if (AllocAndLoadString(&lpDocType,
25 i))
26 {
28 lpDocType);
29 LocalFree((HLOCAL)lpDocType);
30 }
31 }
32
35 0,
36 0);
37
38 return TRUE;
39 }
40
41 case WM_COMMAND:
42 {
43 INT LbSel;
44
45 if (HIWORD(wParam) == LBN_DBLCLK)
46 {
47 LbSel = (INT)SendMessage(hList,
49 0,
50 0);
51 EndDialog(hDlg,
52 LbSel);
53 return TRUE;
54 }
55
56 switch (LOWORD(wParam))
57 {
58 case IDOK:
59 LbSel = (INT)SendMessage(hList,
61 0,
62 0);
63 EndDialog(hDlg,
64 LbSel);
65 return TRUE;
66
67 case IDCANCEL:
68 EndDialog(hDlg, -1);
69 return TRUE;
70 }
71 }
72 }
73
74 return FALSE;
75}
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
HWND hList
Definition: livecd.c:10
#define IDC_LIST
Definition: resource.h:93
#define IDS_DOC_TYPE_RICH_TEXT
Definition: resource.h:94
#define IDS_DOC_TYPE_TEXT
Definition: resource.h:96
#define INT
Definition: polytest.cpp:20
#define HIWORD(l)
Definition: typedefs.h:247
#define ListBox_AddString(hwndCtl, lpsz)
Definition: windowsx.h:472
#define LBN_DBLCLK
Definition: winuser.h:2074
#define LB_SETCURSEL
Definition: winuser.h:2066
#define LB_GETCURSEL
Definition: winuser.h:2042

Referenced by MainWndCommand().

◆ SetEditorEnvironment()

VOID SetEditorEnvironment ( PEDIT_WND_INFO  Info,
BOOL  Setup 
)

Definition at line 117 of file editwnd.c.

119{
120 if (Setup)
121 {
122 /* FIXME - setup editor environment (e.g. show toolbars, enable menus etc) */
123 }
124 else
125 {
126 /* FIXME - cleanup editor environment (e.g. hide toolbars, disable menus etc) */
127 }
128}
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn UINT32 *TableIdx 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:834

Referenced by MainWndSwitchEditorContext().

◆ StatusBarLoadAndFormatString()

BOOL StatusBarLoadAndFormatString ( IN HWND  hStatusBar,
IN INT  PartId,
IN HINSTANCE  hInstance,
IN UINT  uID,
  ... 
)

Definition at line 108 of file misc.c.

113{
114 BOOL Ret = FALSE;
115 LPWSTR lpFormat, lpStr;
116 va_list lArgs;
117
119 hInstance,
120 uID) > 0)
121 {
122 va_start(lArgs, uID);
123 /* let's use FormatMessage to format it because it has the ability to allocate
124 memory automatically */
126 lpFormat,
127 0,
128 0,
129 (VOID*)&lpStr,
130 0,
131 &lArgs);
132 va_end(lArgs);
133
134 if (lpStr != NULL)
135 {
138 (WPARAM)PartId,
139 (LPARAM)lpStr);
140 LocalFree((HLOCAL)lpStr);
141 }
142
144 }
145
146 return Ret;
147}
HWND hStatusBar
Definition: main.c:23
DWORD WINAPI FormatMessageW(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, LPWSTR lpBuffer, DWORD nSize, __ms_va_list *args)
Definition: format_msg.c:583
unsigned int BOOL
Definition: ntddk_ex.h:94
#define BOOL
Definition: nt_native.h:43
#define SB_SETTEXT
Definition: commctrl.h:1954
UINT_PTR WPARAM
Definition: windef.h:207
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)

◆ StatusBarLoadString()

BOOL StatusBarLoadString ( IN HWND  hStatusBar,
IN INT  PartId,
IN HINSTANCE  hInstance,
IN UINT  uID 
)

Definition at line 150 of file misc.c.

154{
155 BOOL Ret = FALSE;
156 LPWSTR lpStr;
157
158 if (AllocAndLoadString(&lpStr,
159 hInstance,
160 uID) > 0)
161 {
164 (WPARAM)PartId,
165 (LPARAM)lpStr);
166 LocalFree((HLOCAL)lpStr);
167 }
168
169 return Ret;
170}

Referenced by MainWndMenuHint().

◆ UninitEditWindowImpl()

VOID UninitEditWindowImpl ( VOID  )

Definition at line 198 of file editwnd.c.

199{
201 hInstance);
202}
#define UnregisterClass
Definition: winuser.h:5873

Referenced by _tWinMain().

◆ UninitMainWindowImpl()

VOID UninitMainWindowImpl ( VOID  )

Definition at line 990 of file mainwnd.c.

Referenced by _tWinMain(), and wWinMain().

Variable Documentation

◆ hInstance

HINSTANCE hInstance
extern

Definition at line 19 of file charmap.c.

◆ ProcessHeap