7 _tWinMain(HINSTANCE hThisInstance
,
8 HINSTANCE hPrevInstance
,
12 LPTSTR lpAppName
, lpVersion
, lpTitle
;
17 INITCOMMONCONTROLSEX icex
;
19 hInstance
= hThisInstance
;
20 ProcessHeap
= GetProcessHeap();
22 icex
.dwSize
= sizeof(INITCOMMONCONTROLSEX
);
23 icex
.dwICC
= ICC_BAR_CLASSES
| ICC_COOL_CLASSES
;
24 InitCommonControlsEx(&icex
);
26 if (!AllocAndLoadString(&lpAppName
, hInstance
, IDS_APPNAME
) ||
27 !AllocAndLoadString(&lpVersion
, hInstance
, IDS_VERSION
) )
32 len
= (int)_tcslen(lpAppName
) + (int)_tcslen(lpVersion
);
33 lpTitle
= HeapAlloc(ProcessHeap
,
35 (len
+ 2) * sizeof(TCHAR
));
38 LocalFree((HLOCAL
)lpAppName
);
39 LocalFree((HLOCAL
)lpVersion
);
48 LocalFree((HLOCAL
)lpAppName
);
49 LocalFree((HLOCAL
)lpVersion
);
53 if (InitMainWindowImpl())
55 if (InitImageEditWindowImpl())
57 if (InitFloatWndClass())
59 hMainWnd
= CreateMainWindow(lpTitle
,
63 /* pump the message queue */
64 while((bRet
= GetMessage(&Msg
,
71 if (!MainWndTranslateMDISysAccel(hMainWnd
,
74 TranslateMessage(&Msg
);
75 DispatchMessage(&Msg
);
83 UninitImageEditWindowImpl();
89 UninitMainWindowImpl();
95 HeapFree(GetProcessHeap(),