系统优化.cpp
上传用户:hshkfsl
上传日期:2014-01-04
资源大小:1910k
文件大小:5k
- // 系统优化.cpp : Defines the class behaviors for the application.
- //
- #include "stdafx.h"
- #include "系统优化.h"
- #include "系统优化Dlg.h"
- #include ".系统优化.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CMyApp
- BEGIN_MESSAGE_MAP(CMyApp, CWinApp)
- //{{AFX_MSG_MAP(CMyApp)
- // NOTE - the ClassWizard will add and remove mapping macros here.
- // DO NOT EDIT what you see in these blocks of generated code!
- //}}AFX_MSG
- ON_COMMAND(ID_Menu_KromoBlue, OnMenuKromoblue)
- ON_COMMAND(MUE_ID_Kromo, OnIdKromo)
- ON_COMMAND(MUE_ID_King, OnIdKing)
- ON_COMMAND(IDM_futuraIII, Onfuturaiii)
- ON_COMMAND(IDM_Devior, OnDevior)
- ON_COMMAND(IDM_corona, Oncorona)
- ON_COMMAND(IDM_nec, Onnec)
- ON_COMMAND(IDM_Tusk, OnTusk)
- ON_COMMAND(IDM_xpblue, Onxpblue)
- ON_COMMAND(IDM_xpgrean, Onxpgrean)
- ON_COMMAND(IDM_xplus, Onxplus)
- ON_COMMAND(IDM_xpsteel, Onxpsteel)
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CMyApp construction
- CMyApp::CMyApp()
- {
- // TODO: add construction code here,
- // Place all significant initialization in InitInstance
- }
- /////////////////////////////////////////////////////////////////////////////
- // The one and only CMyApp object
- CMyApp theApp;
- /////////////////////////////////////////////////////////////////////////////
- // CMyApp initialization
- BOOL CMyApp::InitInstance()
- {
- //=== add by mythma======
- VERIFY( 1 == InitSkinMagicLib(AfxGetInstanceHandle(), NULL, NULL, NULL));
- VERIFY( 1 == LoadSkinFile(this->GetProfileString(::AfxGetAppName(),"skinsave","skin\Devior.smf")));
- //=============end=============
- if (!AfxSocketInit())
- {
- AfxMessageBox(IDP_SOCKETS_INIT_FAILED);
- return FALSE;
- }
- 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
- CMyDlg dlg;
- m_pMainWnd = &dlg;
- //===========add by mythma=======
- // VERIFY( 1 == SetWindowSkin( m_pMainWnd->m_hWnd , "MainFrame" ));
- VERIFY( 1 == SetDialogSkin( "Dialog" ) );
- //=============end===========
- int nResponse = dlg.DoModal();
- if (nResponse == IDOK)
- {
- // TODO: Place code here to handle when the dialog is
- // dismissed with OK
- }
- else if (nResponse == IDCANCEL)
- {
- // TODO: Place code here to handle when the dialog is
- // dismissed with Cancel
- }
- // Since the dialog has been closed, return FALSE so that we exit the
- // application, rather than start the application's message pump.
- return FALSE;
- }
- void CMyApp::OnMenuKromoblue()
- {
- // TODO: 在此添加命令处理程序代码
- WriteProfileString(::AfxGetAppName(),"skinsave","skin\KromoBlue.smf");
- VERIFY( 1 == LoadSkinFile("skin\KromoBlue.smf"));
- }
- void CMyApp::OnIdKromo()
- {
- // TODO: 在此添加命令处理程序代码
- WriteProfileString(::AfxGetAppName(),"skinsave","skin\Kromo.smf");
- VERIFY( 1 == LoadSkinFile("skin\Kromo.smf"));
- }
- void CMyApp::OnIdKing()
- {
- // TODO: 在此添加命令处理程序代码
- WriteProfileString(::AfxGetAppName(),"skinsave","skin\King.smf");
- VERIFY( 1 == LoadSkinFile("skin\King.smf"));
- }
- void CMyApp::Onfuturaiii()
- {
- // TODO: 在此添加命令处理程序代码
- WriteProfileString(::AfxGetAppName(),"skinsave","skin\futuraIII.smf");
- VERIFY( 1 == LoadSkinFile("skin\futuraIII.smf"));
- }
- void CMyApp::OnDevior()
- {
- // TODO: 在此添加命令处理程序代码
- WriteProfileString(::AfxGetAppName(),"skinsave","skin\Devior.smf");
- VERIFY( 1 == LoadSkinFile("skin\Devior.smf"));
- }
- void CMyApp::Oncorona()
- {
- // TODO: 在此添加命令处理程序代码
- WriteProfileString(::AfxGetAppName(),"skinsave","skin\corona.smf");
- VERIFY( 1 == LoadSkinFile("skin\corona.smf"));
- }
- void CMyApp::Onnec()
- {
- // TODO: 在此添加命令处理程序代码
- WriteProfileString(::AfxGetAppName(),"skinsave","skin\nec.smf");
- VERIFY( 1 == LoadSkinFile("skin\nec.smf"));
- }
- void CMyApp::OnTusk()
- {
- // TODO: 在此添加命令处理程序代码
- WriteProfileString(::AfxGetAppName(),"skinsave","skin\Tusk.smf");
- VERIFY( 1 == LoadSkinFile("skin\Tusk.smf"));
- }
- void CMyApp::Onxpblue()
- {
- // TODO: 在此添加命令处理程序代码
- WriteProfileString(::AfxGetAppName(),"skinsave","skin\xpblue.smf");
- VERIFY( 1 == LoadSkinFile("skin\xpblue.smf"));
- }
- void CMyApp::Onxpgrean()
- {
- // TODO: 在此添加命令处理程序代码
- WriteProfileString(::AfxGetAppName(),"skinsave","skin\xpgrean.smf");
- VERIFY( 1 == LoadSkinFile("skin\xpgrean.smf"));
- }
- void CMyApp::Onxplus()
- {
- // TODO: 在此添加命令处理程序代码
- WriteProfileString(::AfxGetAppName(),"skinsave","skin\x-plus.smf");
- VERIFY( 1 == LoadSkinFile("skin\x-plus.smf"));
- }
- void CMyApp::Onxpsteel()
- {
- // TODO: 在此添加命令处理程序代码
- WriteProfileString(::AfxGetAppName(),"skinsave","skin\xpsteel.smf");
- VERIFY( 1 == LoadSkinFile("skin\xpsteel.smf"));
- }