7 _tWinMain(HINSTANCE hThisInstance
,
8 HINSTANCE hPrevInstance
,
12 LPTSTR lpAppName
, lpVersion
, lpTitle
;
18 INITCOMMONCONTROLSEX icex
;
20 hInstance
= hThisInstance
;
21 ProcessHeap
= GetProcessHeap();
23 icex
.dwSize
= sizeof(INITCOMMONCONTROLSEX
);
24 icex
.dwICC
= ICC_BAR_CLASSES
| ICC_COOL_CLASSES
;
25 InitCommonControlsEx(&icex
);
27 if ( !AllocAndLoadString(&lpAppName
, hInstance
, IDS_APPNAME
) ||
28 !AllocAndLoadString(&lpVersion
, hInstance
, IDS_VERSION
) )
33 len
= _tcslen(lpAppName
) + _tcslen(lpVersion
);
34 lpTitle
= HeapAlloc(ProcessHeap
,
36 (len
+ 2) * sizeof(TCHAR
));
39 LocalFree((HLOCAL
)lpAppName
);
40 LocalFree((HLOCAL
)lpVersion
);
49 LocalFree((HLOCAL
)lpAppName
);
50 LocalFree((HLOCAL
)lpVersion
);
54 if (InitMainWindowImpl())
56 if (InitImageEditWindowImpl())
58 if (InitFloatWndClass())
60 hMainWnd
= CreateMainWindow(lpTitle
,
64 /* pump the message queue */
65 while ((bRet
= GetMessage(&Msg
,
72 if (!MainWndTranslateMDISysAccel(hMainWnd
,
75 TranslateMessage(&Msg
);
76 DispatchMessage(&Msg
);
84 UninitImageEditWindowImpl();
90 UninitMainWindowImpl();
96 HeapFree(GetProcessHeap(),