ReactOS
0.4.16-dev-297-gc569aee
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
Variables
_
c
d
e
f
g
h
i
l
n
o
p
s
t
u
x
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
Enumerations
_
c
d
f
i
l
m
o
p
s
t
w
x
Enumerator
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
x
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
x
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Examples
wordpad.c
Go to the documentation of this file.
1
#include "
precomp.h
"
2
3
HINSTANCE
hInstance
;
4
HANDLE
ProcessHeap
;
5
6
int
WINAPI
7
_tWinMain
(
HINSTANCE
hThisInstance,
8
HINSTANCE
hPrevInstance,
9
LPTSTR
lpCmdLine,
10
int
nCmdShow)
11
{
12
LPTSTR
lpAppName, lpVersion,
lpTitle
;
13
HWND
hMainWnd
;
14
MSG
Msg
;
15
BOOL
bRet;
16
int
Ret = 1;
17
size_t
len
;
18
INITCOMMONCONTROLSEX
icex;
19
20
hInstance
= hThisInstance;
21
ProcessHeap
=
GetProcessHeap
();
22
23
icex.
dwSize
=
sizeof
(
INITCOMMONCONTROLSEX
);
24
icex.
dwICC
=
ICC_BAR_CLASSES
|
ICC_COOL_CLASSES
;
25
InitCommonControlsEx
(&icex);
26
27
if
(!
AllocAndLoadString
(&lpAppName,
hInstance
,
IDS_APPNAME
) ||
28
!
AllocAndLoadString
(&lpVersion,
hInstance
,
IDS_VERSION
) )
29
{
30
MessageBox
(
NULL
,
31
_T
(
"Error loading resource "
),
32
NULL
,
33
0);
34
return
1;
35
}
36
37
len
=
_tcslen
(lpAppName) +
_tcslen
(lpVersion);
38
lpTitle
= (
TCHAR
*)
HeapAlloc
(
ProcessHeap
,
39
0,
40
(
len
+ 2) *
sizeof
(
TCHAR
));
41
42
wsprintf
(
lpTitle
,
43
_T
(
"%s %s"
),
44
lpAppName,
45
lpVersion);
46
47
if
(
InitMainWindowImpl
())
48
{
49
if
(
InitEditWindowImpl
())
50
{
51
hMainWnd
=
CreateMainWindow
(
lpTitle
,
52
nCmdShow);
53
if
(
hMainWnd
!=
NULL
)
54
{
55
/* pump the message queue */
56
while
((bRet =
GetMessage
(&
Msg
,
57
NULL
,
58
0,
59
0) != 0))
60
{
61
if
(bRet != (
BOOL
)-1)
62
{
63
if
(!
MainWndTranslateMDISysAccel
(
hMainWnd
,
64
&
Msg
))
65
{
66
TranslateMessage
(&
Msg
);
67
DispatchMessage
(&
Msg
);
68
}
69
}
70
}
71
72
Ret = 0;
73
}
74
75
UninitEditWindowImpl
();
76
}
77
78
UninitMainWindowImpl
();
79
}
80
81
LocalFree
((
HLOCAL
)lpAppName);
82
83
return
Ret;
84
}
IDS_APPNAME
#define IDS_APPNAME
Definition:
resource.h:52
AllocAndLoadString
INT AllocAndLoadString(OUT LPTSTR *lpTarget, IN HINSTANCE hInst, IN UINT uID)
Definition:
misc.c:59
UninitMainWindowImpl
VOID UninitMainWindowImpl(VOID)
Definition:
mainwnd.c:990
InitMainWindowImpl
BOOL InitMainWindowImpl(VOID)
Definition:
mainwnd.c:964
hMainWnd
static HWND hMainWnd
Definition:
wordpad.c:60
CreateMainWindow
HWND CreateMainWindow()
Definition:
biditext.c:330
hInstance
HINSTANCE hInstance
Definition:
charmap.c:19
Msg
struct @1640 Msg[]
InitCommonControlsEx
BOOL WINAPI InitCommonControlsEx(const INITCOMMONCONTROLSEX *lpInitCtrls)
Definition:
commctrl.c:900
lpTitle
TCHAR lpTitle[80]
Definition:
ctm.c:69
NULL
#define NULL
Definition:
types.h:112
GetProcessHeap
#define GetProcessHeap()
Definition:
compat.h:736
HeapAlloc
#define HeapAlloc
Definition:
compat.h:733
UninitEditWindowImpl
VOID UninitEditWindowImpl(VOID)
Definition:
editwnd.c:198
InitEditWindowImpl
BOOL InitEditWindowImpl(VOID)
Definition:
editwnd.c:173
BOOL
unsigned int BOOL
Definition:
ntddk_ex.h:94
len
GLenum GLsizei len
Definition:
glext.h:6722
LocalFree
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition:
heapmem.c:1594
_tWinMain
#define _tWinMain
Definition:
tchar.h:498
void
Definition:
nsiface.idl:2307
MainWndTranslateMDISysAccel
BOOL MainWndTranslateMDISysAccel(HWND hwnd, LPMSG lpMsg)
Definition:
mainwnd.c:616
IDS_VERSION
#define IDS_VERSION
Definition:
resource.h:6
ProcessHeap
HANDLE ProcessHeap
Definition:
wordpad.c:4
INITCOMMONCONTROLSEX
struct tagINITCOMMONCONTROLSEX INITCOMMONCONTROLSEX
ICC_COOL_CLASSES
#define ICC_COOL_CLASSES
Definition:
commctrl.h:69
ICC_BAR_CLASSES
#define ICC_BAR_CLASSES
Definition:
commctrl.h:60
tagINITCOMMONCONTROLSEX
Definition:
commctrl.h:54
tagINITCOMMONCONTROLSEX::dwICC
DWORD dwICC
Definition:
commctrl.h:56
tagINITCOMMONCONTROLSEX::dwSize
DWORD dwSize
Definition:
commctrl.h:55
MSG
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition:
twain.h:1829
_T
#define _T(x)
Definition:
vfdio.h:22
precomp.h
WINAPI
#define WINAPI
Definition:
msvc.h:6
TranslateMessage
BOOL WINAPI TranslateMessage(_In_ const MSG *)
GetMessage
#define GetMessage
Definition:
winuser.h:5802
wsprintf
#define wsprintf
Definition:
winuser.h:5877
MessageBox
#define MessageBox
Definition:
winuser.h:5834
DispatchMessage
#define DispatchMessage
Definition:
winuser.h:5777
TCHAR
char TCHAR
Definition:
xmlstorage.h:189
LPTSTR
CHAR * LPTSTR
Definition:
xmlstorage.h:192
_tcslen
#define _tcslen
Definition:
xmlstorage.h:198
modules
rosapps
templates
old_wordpad
wordpad.c
Generated on Wed Nov 27 2024 06:06:35 for ReactOS by
1.9.6