BOOL TUIApp::InitRun() { DemoConfig *pCfg = (DemoConfig*)QUIGetConfig(); // 初始化阴影效果组件 CWndShadow::Initialize(QUIGetInstance()); SetTopFrameStyle(WS_QEX_ROUNDCONNER|WS_QEX_WNDSHADOW); ////////////////////////////////////////////////////////////////////////// // 登录系统 LoginDlg().DoModal(NULL, WS_EX_TOOLWINDOW|WS_EX_TOPMOST); return FALSE; }
int QUIRun(__in HINSTANCE hInst) { // this resolves ATL window thunking problem when Microsoft Layer for Unicode (MSLU) is used ::DefWindowProc(NULL, 0, 0, 0L); // AtlInitCommonControls(ICC_BAR_CLASSES); // add flags to support other controls int nRet = -1; QApp *pApp = QUIGetApp(); if (NULL != pApp) { if (SUCCEEDED(pApp->Init(NULL, hInst))) { // 否则被优化掉了 QUIGetInstance(); nRet = pApp->Run(hInst); } pApp->Term(); } return nRet; }