choosedir.cpp
来自「《突破Visual C++.NET编程实例五十讲+源文件,初学者学习的好东东!」· C++ 代码 · 共 91 行
CPP
91 行
/****************************************************************************
File: ChooseDir.cpp
Author: Valerie L. Bradley (val@synthcom.com)
Date Created: 08 January 1999
Version: 1.1
Purpose: Demonstrates how the Directory Tree control and the
Drive Combo Box control can be used in an application.
?Copyright 1999 Valerie Bradley.
All rights reserved.
This source code is public domain. I give full permission to all
developers to freely use this code in their own applications, commercial
or otherwise.
This source code is provided "AS IS" without warranty of any kind,
including, but not limited to, any warranty of merchantability, fitness
for any particular purpose, or any warranty otherwise arising out of any
proposal, specification or sample. In no event shall I be liable for
any damages whatsoever arising out of the use of or inability to use
this source code.
****************************************************************************/
#include "stdafx.h"
#include "ChooseDir.h"
#include "ChooseDirDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
// CChooseDirApp
BEGIN_MESSAGE_MAP(CChooseDirApp, CWinApp)
//{{AFX_MSG_MAP(CChooseDirApp)
// 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()
// CChooseDirApp 构造
CChooseDirApp::CChooseDirApp()
{
// TODO: 在此处添加构造代码,
// 将所有重要的初始化放置在 InitInstance 中
}
// 唯一的一个 CViewScrollApp 对象
CChooseDirApp theApp;
// CViewScrollApp 初始化
BOOL CChooseDirApp::InitInstance()
{
AfxEnableControlContainer();
// 如果一个运行在 Windows XP 上的应用程序清单指定要
// 使用 ComCtl32.dll 版本 6 或更高版本来启用可视化方式,
//则需要 InitCommonControls()。否则,将无法创建窗口
#ifdef _AFXDLL
Enable3dControls();
#else
Enable3dControlsStatic();
#endif
CChooseDirDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
}
else if (nResponse == IDCANCEL)
{
}
return FALSE;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?