int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow)
{
INITCOMMONCONTROLSEX icc;
WNDCLASSEX wcx;
ghInstance = hInstance;
/* Initialize common controls. Also needed for MANIFEST's */
/*
* TODO: set the ICC_???_CLASSES that you need.
*/
icc.dwSize = sizeof(icc);
icc.dwICC = ICC_WIN95_CLASSES /*|ICC_COOL_CLASSES|ICC_DATE_CLASSES|ICC_PAGESCROLLER_CLASS|ICC_USEREX_CLASSES|... */;
InitCommonControlsEx(&icc);
/* Load Rich Edit control support */
/*
* TODO: uncomment one of the lines below, if you are using a Rich Edit control.
*/
// LoadLibrary(_T("riched32.dll")); // Rich Edit v1.0
// LoadLibrary(_T("riched20.dll")); // Rich Edit v2.0, v3.0
LoadLibrary(L"riched20.dll");
/*
* TODO: uncomment line below, if you are using the Network Address control (Windows Vista+).
*/
// InitNetworkAddressControl();
/* Get system dialog information */
wcx.cbSize = sizeof(wcx);
if (!GetClassInfoEx(NULL, MAKEINTRESOURCE(32770), &wcx))
return 0;
/* Add our own stuff */
wcx.hInstance = hInstance;
wcx.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDR_ICO_MAIN));
//wcx.lpszClassName = _T("tieng_viClass");
wcx.lpszClassName = L"tieng_viClass";
if (!RegisterClassEx(&wcx))
return 0;
/* The user interface is a modal dialog box */
return DialogBox(hInstance, MAKEINTRESOURCE(DLG_MAIN), NULL, (DLGPROC)MainDlgProc);
}