📄 simplemp3.cpp
字号:
/*
* Copyright (c) 2002, Bcdliang
* All rights reserved.
*
* 文件名称:SimpleMP3.cpp
* 摘 要:类CSimpleMP3App的实现
*
* 当前版本:1.01
* 作 者:LIANG Zheng
* 完成日期:2002年8月11日
*/
#include "stdafx.h"
#include "SimpleMP3.h"
#include "SimpleMP3Dlg.h"
#include "resource.h"
#include "AboutSplashDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSimpleMP3App
BEGIN_MESSAGE_MAP(CSimpleMP3App, CWinApp)
//{{AFX_MSG_MAP(CSimpleMP3App)
// 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_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSimpleMP3App construction
CSimpleMP3App::CSimpleMP3App()
{
// TODO: add construction code here,
// Place all significant initialization in InitInstance
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CSimpleMP3App object
CSimpleMP3App theApp;
/////////////////////////////////////////////////////////////////////////////
// CSimpleMP3App initialization
BOOL CSimpleMP3App::InitInstance()
{
// 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
// 设定注册表中的键名
SetRegistryKey("SimpleMP3");
#ifndef _DEBUG
//检查是否已经运行此程序,是则停止(必须是ExitProcess(0),
//否则会调用ExitInstance()); 否则向系统加入一个名为"SimpleMP3"的Atom,
//并在ExitInstance()中将此Atom删除
if (GlobalFindAtom("SimpleMP3")) //查找是否已经运行此程序
ExitProcess(0);
else
GlobalAddAtom("SimpleMP3");
#endif
// Show the splash screen!
::ShowSplash(true);
m_pMainDlg = new CSimpleMP3Dlg(); // Zxm
m_pMainWnd = m_pMainDlg;
if (!m_pMainDlg->Create(IDD_SIMPLEMP3_DIALOG))
return FALSE;
m_pMainDlg->UpdateWindow();
return TRUE;
}
int CSimpleMP3App::ExitInstance()
{
// TODO: Add your specialized code here and/or call the base class
delete m_pMainDlg;
ATOM atom=GlobalFindAtom("SimpleMP3");
GlobalDeleteAtom(atom);
return CWinApp::ExitInstance();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -