ReactOS 0.4.16-dev-197-g92996da
wordpad.c File Reference
#include "precomp.h"
Include dependency graph for wordpad.c:

Go to the source code of this file.

Functions

int WINAPI _tWinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow)
 

Variables

HINSTANCE hInstance
 
HANDLE ProcessHeap
 

Function Documentation

◆ _tWinMain()

int WINAPI _tWinMain ( HINSTANCE  hThisInstance,
HINSTANCE  hPrevInstance,
LPTSTR  lpCmdLine,
int  nCmdShow 
)

Definition at line 7 of file wordpad.c.

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:52
INT AllocAndLoadString(OUT LPTSTR *lpTarget, IN HINSTANCE hInst, IN UINT uID)
Definition: misc.c:59
VOID UninitMainWindowImpl(VOID)
Definition: mainwnd.c:990
BOOL InitMainWindowImpl(VOID)
Definition: mainwnd.c:964
static HWND hMainWnd
Definition: wordpad.c:60
HWND CreateMainWindow()
Definition: biditext.c:330
HINSTANCE hInstance
Definition: charmap.c:19
struct @1636 Msg[]
BOOL WINAPI InitCommonControlsEx(const INITCOMMONCONTROLSEX *lpInitCtrls)
Definition: commctrl.c:900
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:1594
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
BOOL WINAPI TranslateMessage(_In_ const MSG *)
#define GetMessage
Definition: winuser.h:5802
#define wsprintf
Definition: winuser.h:5877
#define MessageBox
Definition: winuser.h:5834
#define DispatchMessage
Definition: winuser.h:5777
char TCHAR
Definition: xmlstorage.h:189
CHAR * LPTSTR
Definition: xmlstorage.h:192
#define _tcslen
Definition: xmlstorage.h:198

Variable Documentation

◆ hInstance

HINSTANCE hInstance

Definition at line 3 of file wordpad.c.

◆ ProcessHeap

HANDLE ProcessHeap
  • Internal Headers *‍/

Definition at line 4 of file wordpad.c.

Referenced by _tWinMain().