ReactOS  0.4.14-dev-49-gfb4591c
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;
13  HWND hMainWnd;
14  MSG Msg;
15  BOOL bRet;
16  int Ret = 1;
17  size_t len;
19 
20  hInstance = hThisInstance;
22 
23  icex.dwSize = sizeof(INITCOMMONCONTROLSEX);
25  InitCommonControlsEx(&icex);
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 
47  if (InitMainWindowImpl())
48  {
49  if (InitEditWindowImpl())
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 }
VOID UninitEditWindowImpl(VOID)
Definition: editwnd.c:198
#define DispatchMessage
Definition: winuser.h:5666
BOOL WINAPI TranslateMessage(_In_ const MSG *)
BOOL InitEditWindowImpl(VOID)
Definition: editwnd.c:173
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
static INT AllocAndLoadString(OUT LPTSTR *lpTarget, IN HINSTANCE hInst, IN UINT uID)
Definition: misc.c:60
struct tagINITCOMMONCONTROLSEX INITCOMMONCONTROLSEX
CHAR * LPTSTR
Definition: xmlstorage.h:192
struct @1576 Msg[]
unsigned int BOOL
Definition: ntddk_ex.h:94
#define ICC_COOL_CLASSES
Definition: commctrl.h:69
size_t __cdecl _tcslen(const _TCHAR *str)
Definition: tcslen.h:9
smooth NULL
Definition: ftsmooth.c:416
char TCHAR
Definition: xmlstorage.h:189
BOOL MainWndTranslateMDISysAccel(HWND hwnd, LPMSG lpMsg)
Definition: mainwnd.c:1407
#define ICC_BAR_CLASSES
Definition: commctrl.h:60
#define IDS_VERSION
Definition: resource.h:291
#define _T(x)
Definition: vfdio.h:22
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
HINSTANCE hInstance
Definition: wordpad.c:3
VOID UninitMainWindowImpl(VOID)
Definition: mainwnd.c:987
static HWND hMainWnd
Definition: wordpad.c:59
BOOL WINAPI InitCommonControlsEx(const INITCOMMONCONTROLSEX *lpInitCtrls)
Definition: commctrl.c:893
GLenum GLsizei len
Definition: glext.h:6722
#define MessageBox
Definition: winuser.h:5723
HANDLE ProcessHeap
Definition: wordpad.c:4
#define IDS_APPNAME
Definition: resource.h:49
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1577
#define GetMessage
Definition: winuser.h:5691
TCHAR lpTitle[80]
Definition: ctm.c:69
BOOL InitMainWindowImpl(VOID)
Definition: mainwnd.c:961
#define wsprintf
Definition: winuser.h:5766
HWND CreateMainWindow(LPCTSTR lpCaption, int nCmdShow)
Definition: mainwnd.c:920

Variable Documentation

◆ hInstance

◆ ProcessHeap

HANDLE ProcessHeap
  • Internal Headers */

Definition at line 4 of file wordpad.c.

Referenced by _tWinMain(), add_entry(), AddBootStoreEntry(), AddDiskToList(), AddNTOSInstallation(), AddPartitionToDisk(), AddProvider(), AdjustBrightness(), AdjustContrast(), AppendGenericListEntry(), Bri_OnInitDialog(), BrightnessProc(), calloc(), ChangeListViewText(), CloseIniBootLoaderStore(), CommandDumpSector(), CommandPartInfo(), Cont_OnInitDialog(), ContrastProc(), CreateDialogProc(), CreateEditWindow(), CreateFileSystemList(), CreateGenericList(), CreateImageEditWindow(), CreateInsertBlankRegion(), CreateMainWindow(), CreatePartitionList(), CreateProgressBarEx(), DefaultProcessEntry(), DeleteDialogProc(), DeletePartition(), DestroyEditWnd(), DestroyFileSystemList(), DestroyGenericList(), DestroyPartitionList(), DestroyProgressBar(), DeviceInstallThread(), DisplayBlackAndWhite(), DisplayBlur(), DisplayInvertedColors(), DisplaySharpness(), do_reg_operation(), EnumerateBiosDiskEntries(), free(), FreeLdrEnumerateBootEntries(), FreeMemory(), freep(), FreeServiceList(), GetServiceDescription(), GetServiceList(), GetStringFromDialog(), ImageEditWndProc(), INF_FreeData(), INF_GetDataField(), IniCacheAddKey(), IniCacheAddSection(), IniCacheAppendSection(), IniCacheCreate(), IniCacheDestroy(), IniCacheFindClose(), IniCacheFindFirstValue(), IniCacheFreeKey(), IniCacheFreeSection(), IniCacheInsertKey(), IniCacheLoadByHandle(), IniCacheLoadFromMemory(), IniCacheSaveByHandle(), InitDialog(), InitGeneralPage(), InstallBtrfsBootCodeToDisk(), InstallDevice(), InstallDriver(), InstallFat12BootCodeToFloppy(), InstallFat16BootCode(), InstallFat32BootCode(), InstallMbrBootCodeToDiskHelper(), IsThereAValidBootSector(), LoadDIBImage(), MainWndCreateFloatWindows(), MainWndDestroyFloatWindows(), MainWndProc(), malloc(), MSZipAlloc(), MSZipFree(), NtLdrEnumerateBootEntries(), OpenIniBootLoaderStore(), OpenPropSheet(), PnpEventThread(), ProcessLangEntry(), ReAllocateLayoutBuffer(), RtlDestroyHeap(), RtlpFreeDebugInfo(), SaveBootSector(), SaveDlgInfo(), SetStartupType(), SetupCloseFileQueue(), SetupDeleteQueueEntry(), SetupOpenFileQueue(), SetupQueueCopyWithCab(), SetupQueueDeleteW(), SetupQueueRenameW(), split(), STRUCT(), SystemConfigurationDataQueryRoutine(), TbdAddToolbar(), ToolbarDeleteControlSpace(), ToolbarInsertSpaceForControl(), TV1_GetDependants(), TV2_GetDependants(), WriteConsoleOutputCharacterA(), and WriteConsoleOutputCharacterW().