ReactOS  0.4.13-dev-479-gec9c8fd
imagesoft.c
Go to the documentation of this file.
1 #include <precomp.h>
2 
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;
19 
20  hInstance = hThisInstance;
22 
23  icex.dwSize = sizeof(INITCOMMONCONTROLSEX);
25  InitCommonControlsEx(&icex);
26 
27  if ( !AllocAndLoadString(&lpAppName, hInstance, IDS_APPNAME) ||
29  {
30  return Ret;
31  }
32 
33  len = _tcslen(lpAppName) + _tcslen(lpVersion);
35  0,
36  (len + 2) * sizeof(TCHAR));
37  if (lpTitle == NULL)
38  {
39  LocalFree((HLOCAL)lpAppName);
40  LocalFree((HLOCAL)lpVersion);
41  return Ret;
42  }
43 
45  _T("%s %s"),
46  lpAppName,
47  lpVersion);
48 
49  LocalFree((HLOCAL)lpAppName);
50  LocalFree((HLOCAL)lpVersion);
51 
52  if (TbdInitImpl())
53  {
54  if (InitMainWindowImpl())
55  {
57  {
58  if (InitFloatWndClass())
59  {
61  nCmdShow);
62  if (hMainWnd != NULL)
63  {
64  /* pump the message queue */
65  while ((bRet = GetMessage(&Msg,
66  NULL,
67  0,
68  0) != 0))
69  {
70  if (bRet != (BOOL)-1)
71  {
73  &Msg))
74  {
77  }
78  }
79  }
80 
81  Ret = 0;
82  }
83 
85  }
86 
88  }
89 
91  }
92 
93  TbdUninitImpl();
94  }
95 
97  0,
98  lpTitle);
99 
100  return Ret;
101 }
#define DispatchMessage
Definition: winuser.h:5631
BOOL WINAPI TranslateMessage(_In_ const MSG *)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
HANDLE ProcessHeap
Definition: imagesoft.c:4
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
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
VOID UninitImageEditWindowImpl(VOID)
Definition: imgedwnd.c:538
int WINAPI _tWinMain(HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow)
Definition: imagesoft.c:7
BOOL InitFloatWndClass(VOID)
Definition: floatwindow.c:604
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)
VOID UninitFloatWndImpl(VOID)
Definition: floatwindow.c:623
#define WINAPI
Definition: msvc.h:8
VOID UninitMainWindowImpl(VOID)
Definition: mainwnd.c:987
BOOL InitImageEditWindowImpl(VOID)
Definition: imgedwnd.c:513
HWND hMainWnd
Definition: magnifier.c:32
BOOL WINAPI InitCommonControlsEx(const INITCOMMONCONTROLSEX *lpInitCtrls)
Definition: commctrl.c:893
GLenum GLsizei len
Definition: glext.h:6722
VOID TbdUninitImpl(VOID)
Definition: tooldock.c:1134
struct @1574 Msg[]
#define IDS_APPNAME
Definition: resource.h:49
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1577
#define GetMessage
Definition: winuser.h:5656
BOOL TbdInitImpl(VOID)
Definition: tooldock.c:1116
TCHAR lpTitle[80]
Definition: ctm.c:69
BOOL InitMainWindowImpl(VOID)
Definition: mainwnd.c:961
#define wsprintf
Definition: winuser.h:5731
HINSTANCE hInstance
Definition: imagesoft.c:3
#define HeapFree(x, y, z)
Definition: compat.h:394
HWND CreateMainWindow(LPCTSTR lpCaption, int nCmdShow)
Definition: mainwnd.c:920