ReactOS 0.4.15-dev-5672-gf73ac17
wordpad.c
Go to the documentation of this file.
1#include "precomp.h"
2
5
6int WINAPI
7_tWinMain(HINSTANCE hThisInstance,
8 HINSTANCE hPrevInstance,
9 LPTSTR lpCmdLine,
10 int nCmdShow)
11{
12 LPTSTR lpAppName, lpVersion, lpTitle;
14 MSG Msg;
15 BOOL bRet;
16 int Ret = 1;
17 size_t len;
19
20 hInstance = hThisInstance;
22
23 icex.dwSize = sizeof(INITCOMMONCONTROLSEX);
26
27 if (!AllocAndLoadString(&lpAppName, hInstance, IDS_APPNAME) ||
29 {
31 _T("Error loading resource "),
32 NULL,
33 0);
34 return 1;
35 }
36
37 len = _tcslen(lpAppName) + _tcslen(lpVersion);
39 0,
40 (len + 2) * sizeof(TCHAR));
41
43 _T("%s %s"),
44 lpAppName,
45 lpVersion);
46
48 {
50 {
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 {
64 &Msg))
65 {
68 }
69 }
70 }
71
72 Ret = 0;
73 }
74
76 }
77
79 }
80
81 LocalFree((HLOCAL)lpAppName);
82
83 return Ret;
84}
#define IDS_APPNAME
Definition: resource.h:49
INT AllocAndLoadString(OUT LPTSTR *lpTarget, IN HINSTANCE hInst, IN UINT uID)
Definition: misc.c:59
VOID UninitMainWindowImpl(VOID)
Definition: mainwnd.c:992
BOOL InitMainWindowImpl(VOID)
Definition: mainwnd.c:966
static HWND hMainWnd
Definition: wordpad.c:60
HWND CreateMainWindow()
Definition: biditext.c:330
HINSTANCE hInstance
Definition: charmap.c:19
struct @1609 Msg[]
BOOL WINAPI InitCommonControlsEx(const INITCOMMONCONTROLSEX *lpInitCtrls)
Definition: commctrl.c:893
TCHAR lpTitle[80]
Definition: ctm.c:69
#define NULL
Definition: types.h:112
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
VOID UninitEditWindowImpl(VOID)
Definition: editwnd.c:198
BOOL InitEditWindowImpl(VOID)
Definition: editwnd.c:173
unsigned int BOOL
Definition: ntddk_ex.h:94
GLenum GLsizei len
Definition: glext.h:6722
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1577
#define _tWinMain
Definition: tchar.h:498
BOOL MainWndTranslateMDISysAccel(HWND hwnd, LPMSG lpMsg)
Definition: mainwnd.c:616
#define IDS_VERSION
Definition: resource.h:6
HANDLE ProcessHeap
Definition: wordpad.c:4
struct tagINITCOMMONCONTROLSEX INITCOMMONCONTROLSEX
#define ICC_COOL_CLASSES
Definition: commctrl.h:69
#define ICC_BAR_CLASSES
Definition: commctrl.h:60
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
#define _T(x)
Definition: vfdio.h:22
#define WINAPI
Definition: msvc.h:6
BOOL WINAPI TranslateMessage(_In_ const MSG *)
#define GetMessage
Definition: winuser.h:5780
#define wsprintf
Definition: winuser.h:5855
#define MessageBox
Definition: winuser.h:5812
#define DispatchMessage
Definition: winuser.h:5755
char TCHAR
Definition: xmlstorage.h:189
CHAR * LPTSTR
Definition: xmlstorage.h:192
#define _tcslen
Definition: xmlstorage.h:198