|
BOOL CAgiLeanChatApp :: InitInstance ()
{
// === load skin ==
HINSTANCE hInstance = AfxGetInstanceHandle ();
VERIFY (1 == InitSkinMagicLib (hInstance, NULL, NULL, NULL));
VERIFY (1 == LoadSkinFile (SOFT_SKIN));
// <==== end ==============================
The
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);
// =========== Start skin ======================================= ===
VERIFY (1 == SetWindowSkin (m_pMainWnd-> m_hWnd, "MainFrame"));
VERIFY (1 == SetDialogSkin ("Dialog"));
// <============= end ================================= ========
// Display at the front of the window
SetWindowPos (m_pMainWnd-> m_hWnd, HWND_TOPMOST, 0,0,0,0, SWP_NOMOVE | SWP_NOSIZE);
The
// The one and only window has been initialized, so show and update it.
m_pMainWnd-> ShowWindow (SW_SHOW);
m_pMainWnd-> UpdateWindow ();
return TRUE;
} |
|