|
楼主 |
发表于 2020-5-24 09:45:01
|
显示全部楼层
BOOL CAgiLeanChatApp::InitInstance()
{
//===加载皮肤=====
HINSTANCE hInstance=AfxGetInstanceHandle();
VERIFY( 1 == InitSkinMagicLib(hInstance, NULL, NULL, NULL));
VERIFY( 1 == LoadSkinFile(SOFT_SKIN));
//<====end==============================
AfxEnableControlContainer();
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
// Change the registry key under which our settings are stored.
// TODO: You should modify this string to be something appropriate
// such as the name of your company or organization.
SetRegistryKey(_T("Local AppWizard-Generated Applications"));
CMainFrame* pFrame = new CMainFrame;
m_pMainWnd = pFrame;
// create and load the frame with its resources
pFrame->LoadFrame(IDR_MAINFRAME,
WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL,
NULL);
//===========启动皮肤======================================
VERIFY( 1 == SetWindowSkin( m_pMainWnd->m_hWnd , "MainFrame" ));
VERIFY( 1 == SetDialogSkin( "Dialog" ));
//<=============end=========================================
//窗口最前面显示
SetWindowPos(m_pMainWnd->m_hWnd,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
// The one and only window has been initialized, so show and update it.
m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->UpdateWindow();
return TRUE;
}
|
|