怎么能用CFileDialog类打开一个选择目录的Dialog???

leonchen 2001-04-25 04:05:00
如题。
不要告诉我先打开,然后Get.....
...全文
1152 32 打赏 收藏 转发到动态 举报
写回复
用AI写文章
32 条回复
切换为时间正序
请发表友善的回复…
发表回复
100_001 2001-08-09
  • 打赏
  • 举报
回复
如果要在CFileDialog(只显示目录)中选择目录该怎么做?

比如,从CFileDialog派生出一个类来。
kukadu8 2001-05-13
  • 打赏
  • 举报
回复






















































































































































































































































































































































































































































































































































































































































请问在哪里可以留言?
feijunjun 2001-04-27
  • 打赏
  • 举报
回复
DirDialog类我都在用,好像是微软公司的成果吧……
clack 2001-04-27
  • 打赏
  • 举报
回复
感谢还不赶紧加分?呵呵
leonchen 2001-04-26
  • 打赏
  • 举报
回复
又一个高手为了我这个问题写了一个类!!!
非常感谢!!
tlovexyj 2001-04-26
  • 打赏
  • 举报
回复
////////////////////////////////////////////////////////////////////////
// DirDialog.h: interface for the CDirDialog class.
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_DIRDIALOG_H__62FFAC92_1DEE_11D1_B87A_0060979CDF6D__INCLUDED_)
#define AFX_DIRDIALOG_H__62FFAC92_1DEE_11D1_B87A_0060979CDF6D__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

class CDirDialog
{
public:

CDirDialog();
virtual ~CDirDialog();

BOOL DoBrowse(CWnd *pwndParent = NULL);

CString m_strWindowTitle;
CString m_strPath;
CString m_strInitDir;
CString m_strSelDir;
CString m_strTitle;
int m_iImageIndex;
BOOL m_bStatus;

private:
virtual BOOL SelChanged(LPCSTR lpcsSelection, CString& csStatusText) { return TRUE; };
static int __stdcall CDirDialog::BrowseCtrlCallback(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData);
};

#endif // !defined(AFX_DIRDIALOG_H__62FFAC92_1DEE_11D1_B87A_0060979CDF6D__INCLUDED_)




///////////////////////////////////////////////////////////////////////////
// DirDialog.cpp: implementation of the CDirDialog class.
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "DirDialog.h"
#include "shlobj.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

// Callback function called by SHBrowseForFolder's browse control
// after initialization and when selection changes
int __stdcall CDirDialog::BrowseCtrlCallback(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData)
{
CDirDialog* pDirDialogObj = (CDirDialog*)lpData;
pDirDialogObj->m_strPath.Empty();
if (uMsg == BFFM_INITIALIZED )
{
if( ! pDirDialogObj->m_strSelDir.IsEmpty() )
::SendMessage(hwnd, BFFM_SETSELECTION, TRUE, (LPARAM)(LPCTSTR)(pDirDialogObj->m_strSelDir));
if( ! pDirDialogObj->m_strWindowTitle.IsEmpty() )
::SetWindowText(hwnd, (LPCTSTR) pDirDialogObj->m_strWindowTitle);
}
else if( uMsg == BFFM_SELCHANGED )
{
LPITEMIDLIST pidl = (LPITEMIDLIST) lParam;
char selection[MAX_PATH];
if( ! ::SHGetPathFromIDList(pidl, selection) )
selection[0] = '\0';

CString csStatusText;
BOOL bOk = pDirDialogObj->SelChanged(selection, csStatusText);

if( pDirDialogObj->m_bStatus )
::SendMessage(hwnd, BFFM_SETSTATUSTEXT , 0, (LPARAM)(LPCSTR)csStatusText);

::SendMessage(hwnd, BFFM_ENABLEOK, 0, bOk);
}
else if( uMsg == BFFM_VALIDATEFAILED )
{
CString path;
path = (char *)lParam;
if(path[path.GetLength()-1]!='\\') path+='\\';
if(!IsCharAlpha(path[0]) || path[1]!=':' || path[2]!='\\')
{
CString tmp;
tmp = "c:\\";
tmp+=path;
path=tmp;
}
pDirDialogObj->m_strPath = path;
}
return 0;
}

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CDirDialog::CDirDialog()
{
m_bStatus = FALSE;
}

CDirDialog::~CDirDialog()
{
}

BOOL CDirDialog::DoBrowse(CWnd *pwndParent)
{

if( ! m_strSelDir.IsEmpty() )
{
m_strSelDir.TrimRight();
if( m_strSelDir.Right(1) == "\\" || m_strSelDir.Right(1) == "//" )
m_strSelDir = m_strSelDir.Left(m_strSelDir.GetLength() - 1);
}

LPMALLOC pMalloc;
if (SHGetMalloc (&pMalloc)!= NOERROR)
return FALSE;

BROWSEINFO bInfo;
LPITEMIDLIST pidl;
ZeroMemory ( (PVOID) &bInfo,sizeof (BROWSEINFO));

if (!m_strInitDir.IsEmpty ())
{
OLECHAR olePath[MAX_PATH];
ULONG chEaten;
ULONG dwAttributes;
HRESULT hr;
LPSHELLFOLDER pDesktopFolder;
//
// Get a pointer to the Desktop's IShellFolder interface.
//
if (SUCCEEDED(SHGetDesktopFolder(&pDesktopFolder)))
{
//
// IShellFolder::ParseDisplayName requires the file name be in Unicode.
//
MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, m_strInitDir.GetBuffer(MAX_PATH), -1,
olePath, MAX_PATH);

m_strInitDir.ReleaseBuffer (-1);
//
// Convert the path to an ITEMIDLIST.
//
hr = pDesktopFolder->ParseDisplayName(NULL,
NULL,
olePath,
&chEaten,
&pidl,
&dwAttributes);
if (FAILED(hr))
{
pMalloc ->Free (pidl);
pMalloc ->Release ();
return FALSE;
}
bInfo.pidlRoot = pidl;

}
}
bInfo.hwndOwner = pwndParent == NULL ? NULL : pwndParent->GetSafeHwnd();
bInfo.pszDisplayName = m_strPath.GetBuffer (MAX_PATH);
bInfo.lpszTitle = (m_strTitle.IsEmpty()) ? "Open" : m_strTitle;
bInfo.ulFlags = BIF_RETURNFSANCESTORS |
BIF_RETURNONLYFSDIRS |
BIF_EDITBOX | BIF_VALIDATE |
(m_bStatus ? BIF_STATUSTEXT : 0);

bInfo.lpfn = BrowseCtrlCallback; // address of callback function
bInfo.lParam = (LPARAM)this; // pass address of object to callback function

m_strPath.ReleaseBuffer();
if ((pidl = ::SHBrowseForFolder(&bInfo)) == NULL)
{
if(m_strPath.IsEmpty()) return FALSE;
}
m_iImageIndex = bInfo.iImage;
CString s;
s= m_strPath;

if (::SHGetPathFromIDList(pidl, m_strPath.GetBuffer(MAX_PATH)) == FALSE)
{
if(m_strPath.IsEmpty())
{
pMalloc ->Free(pidl);
pMalloc ->Release();
return FALSE;
}
}

m_strPath.ReleaseBuffer();
if(!s.IsEmpty()) m_strPath = s;

pMalloc ->Free(pidl);
pMalloc ->Release();

return TRUE;
}


////////////////////////////////
//use it
////////////////////////////////
void CFolderPath::OnBrowse()
{
// TODO: Add your control notification handler code here
CDirDialog dlg;
dlg.m_strWindowTitle = "选择文件夹";
dlg.m_strTitle = "请选择文件夹\n路径:";
dlg.m_strSelDir="c:\\windows";
if(dlg.DoBrowse())
{
m_sPath = dlg.m_strPath;
bool bUpdate = true;

if(!SetCurrentDirectory(m_sPath))
{
CString msg;
msg.Format("文件夹\"%s\"并不存在.\n你要建立该文件夹吗?", m_sPath);
if(MessageBox(msg, "设置", MB_YESNO | MB_ICONQUESTION)==IDYES)
{
char *p=NULL;
int nPos=m_sPath.GetLength();
p=m_sPath.GetBuffer(nPos);
if( p[nPos-1]=='\\' )
p[nPos-1]='\0';
sMainPath = p;
m_sPath.ReleaseBuffer();
}
else bUpdate = false;
}
else
{
char *p=NULL;
int nPos=m_sPath.GetLength();
p=m_sPath.GetBuffer(nPos);
if( p[nPos-1]=='\\' )
p[nPos-1]='\0';
sMainPath = p;
m_sPath.ReleaseBuffer();
}
if(bUpdate)
{
UpdateData(false);
GetDlgItem(IDC_PATH)->SetFocus();
}
}
}
frankzhai 2001-04-26
  • 打赏
  • 举报
回复
Please take a look at these two articles

http://support.microsoft.com/support/kb/articles/Q105/4/97.asp
http://support.microsoft.com/support/kb/articles/Q195/0/34.asp


leonchen 2001-04-25
  • 打赏
  • 举报
回复
对呀,我正要问你呢。
打开不了文件怎么取路径
timefg 2001-04-25
  • 打赏
  • 举报
回复
空文件夹里面没有文件,怎么打开文件?是打开不了文件的呀!
timefg 2001-04-25
  • 打赏
  • 举报
回复
什么文件夹为空?空文件夹也可以的呀。创建一个CFileDialog的对象,然后生成。你实验一下,怎么不可以?
leonchen 2001-04-25
  • 打赏
  • 举报
回复
CFileDialog m_mydia(TRUE,NULL,NULL,OFN_HIDEREADONLY,NULL,NULL);
m_mydia.Domodal();
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
你这个是什么意思?打开一个选择文件的东东然后在截取路径是吧。我早也考虑过,但如果文件夹是空的怎么办。所以才贴的。
timefg 2001-04-25
  • 打赏
  • 举报
回复
CFileDialog m_mydia(TRUE,NULL,NULL,OFN_HIDEREADONLY,NULL,NULL);
m_mydia.Domodal();
leonchen 2001-04-25
  • 打赏
  • 举报
回复
哎呀,写程序的大多都是臭男人。哪有几个会玩绣花针的。
youyou 2001-04-25
  • 打赏
  • 举报
回复
我是真的佩服。
我就没有这个耐心。
Smile_Tiger 2001-04-25
  • 打赏
  • 举报
回复
在C++中,派生是解决特殊要求的重要手段

虽然看起来很麻烦,但是很清晰
youyou 2001-04-25
  • 打赏
  • 举报
回复
eggplant(拉拉)老兄,佩服!!为了一个对话框写了一个类。厉害!
leonchen 2001-04-25
  • 打赏
  • 举报
回复
挥泪大甩卖呀!
现在DHL可以邮寄考肉吧,我给你邮寄去好不好。
多谢拉各位!如果真的想吃就说出你们在什么地方我好安排
eggplant 2001-04-25
  • 打赏
  • 举报
回复
能不能不用CFileDialog,用一个别的:如下// FolderDialog.h: interface for the CFolderDialog class.
// $Copyright ?1998, Kenneth M. Reed, All Rights Reserved. $
// $Header: FolderDialog.h Revision:1.11 Mon Apr 06 12:04:50 1998 KenReed $

#ifndef _CFolderDialog_
#define _CFolderDialog_

#include <shlobj.h>

class CFolderDialog
{
friend static int CALLBACK BrowseDirectoryCallback(
HWND hWnd, UINT uMsg, LPARAM lParam, LPARAM lpData);

public:
CFolderDialog( LPCTSTR lpszFolderName = NULL,
DWORD dwFlags = NULL/*BIF_RETURNONLYFSDIRS*/,
CWnd* pParentWnd = NULL);
virtual ~CFolderDialog();
virtual int DoModal();
CString GetPathName() const;

protected:
virtual void OnInitDialog();
virtual void OnSelChanged(ITEMIDLIST* pIdl);
virtual void CallbackFunction(HWND hWnd, UINT uMsg, LPARAM lParam);

void EnableOK(BOOL bEnable = TRUE);
void SetSelection(LPCTSTR pszSelection);
void SetSelection(ITEMIDLIST* pIdl);
void SetStatusText(LPCTSTR pszStatusText);
CString ShortName(const CString& strName);

public:
BROWSEINFO m_bi;

protected:
CString m_strInitialFolderName;
CString m_strFinalFolderName;

TCHAR m_szDisplayName[MAX_PATH];
TCHAR m_szPath[MAX_PATH];

HWND m_hDialogBox;


};

#endif // _CFolderDialog_
///////////////////////////////////////////////
// FolderDialog.cpp: implementation of the CFolderDialog class.
// $Copyright ? 1991-1998 Quma Software, Inc. ALL RIGHTS RESERVED. $
// $Header: FolderDialog.cpp Revision:1.11 Tue Jun 23 18:00:44 1998 KenReed $

#include "stdafx.h"
#include "FolderDialog.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
static int CALLBACK BrowseDirectoryCallback(
HWND hWnd, UINT uMsg, LPARAM lParam, LPARAM lpData)
{
// Context was pointer to CFolderDialog instance
CFolderDialog* pFd = (CFolderDialog*)lpData;

// Let the class handle it
pFd->CallbackFunction(hWnd, uMsg, lParam);

// Always return 0 as per SHBrowseFolder spec
return 0;
}

CFolderDialog::CFolderDialog(LPCTSTR lpszFolderName, DWORD dwFlags, CWnd* pParentWnd)
{
// Use the supplied initial folder if non-null.
if (lpszFolderName == NULL)
m_strInitialFolderName = _T("");
else
m_strInitialFolderName = lpszFolderName;

memset(&m_bi, '\0', sizeof(BROWSEINFO));

if (pParentWnd == NULL)
m_bi.hwndOwner = 0;
else
m_bi.hwndOwner = pParentWnd->GetSafeHwnd();

// Fill in the rest of the structure
m_bi.pidlRoot = NULL;
m_bi.pszDisplayName = m_szDisplayName;
m_bi.lpszTitle = _T("当前选中的目录:");
m_bi.ulFlags = dwFlags | BIF_STATUSTEXT;
m_bi.lpfn = BrowseDirectoryCallback;
m_bi.lParam = (LPARAM)this;

}

CFolderDialog::~CFolderDialog()
{

}

void CFolderDialog::CallbackFunction(HWND hWnd, UINT uMsg, LPARAM lParam)
{
// Save the window handle. The Set* functions need it and they may
// be called by the virtual funtions.
m_hDialogBox = hWnd;

// Dispatch the two message types to the virtual functions
switch (uMsg)
{
case BFFM_INITIALIZED:
OnInitDialog();
break;
case BFFM_SELCHANGED:
OnSelChanged((ITEMIDLIST*) lParam);
break;
}
}

int CFolderDialog::DoModal()
{
int nReturn = IDOK;

// initialize the result to the starting folder value
m_strFinalFolderName = m_strInitialFolderName;

ITEMIDLIST* piid = NULL;

// call the shell function
piid = ::SHBrowseForFolder(&m_bi);

// process the result
if (piid && ::SHGetPathFromIDList(piid, m_szPath))
{
m_strFinalFolderName = m_szPath;
nReturn = IDOK;
}
else
{
nReturn = IDCANCEL;
}

// Release the ITEMIDLIST if we got one
if (piid)
{
LPMALLOC lpMalloc;
VERIFY(::SHGetMalloc(&lpMalloc) == NOERROR);
lpMalloc->Free(piid);
lpMalloc->Release();
}

return nReturn;
}

CString CFolderDialog::GetPathName() const
{
return m_strFinalFolderName;
}

void CFolderDialog::EnableOK(BOOL bEnable)
{
// Documentation is incorrect! It is the lParam, not the wParam, that
// controls the enable!
//::SendMessage(m_hDialogBox, BFFM_ENABLEOK, (bEnable ? 1 : 0), 0);
::SendMessage(m_hDialogBox, BFFM_ENABLEOK, 0, (bEnable ? 1 : 0));
}

void CFolderDialog::SetSelection(LPCTSTR pszSelection)
{
::SendMessage(m_hDialogBox, BFFM_SETSELECTION, TRUE, (LPARAM) pszSelection);
}

void CFolderDialog::SetSelection(ITEMIDLIST* pIdl)
{
::SendMessage(m_hDialogBox, BFFM_SETSELECTION, FALSE, (LPARAM) pIdl);
}

void CFolderDialog::SetStatusText(LPCTSTR pszStatusText)
{
::SendMessage(m_hDialogBox, BFFM_SETSTATUSTEXT, 0, (LPARAM) pszStatusText);
}

CString CFolderDialog::ShortName(const CString& strName)
{
CString strShort;
if (strName.GetLength() <= 35)
strShort = strName;
else
strShort = strName.Left(35) + _T("...");

return strShort;
}

void CFolderDialog::OnInitDialog()
{
// Default handing of the init dialog message sets the selection to
// the initial folder
SetSelection(m_strInitialFolderName);
SetStatusText(ShortName(m_strInitialFolderName));
}

void CFolderDialog::OnSelChanged(ITEMIDLIST* pIdl)
{
::SHGetPathFromIDList(pIdl, m_szPath);
m_strFinalFolderName = m_szPath;
SetStatusText(ShortName(m_strFinalFolderName));
}





youyou 2001-04-25
  • 打赏
  • 举报
回复
想当初我可是花了50分问来的,今天便宜了。
BROWSEINFO bi;
TCHAR szDisplayName[MAX_PATH];
LPITEMIDLIST pidl;
LPMALLOC pMalloc = NULL;

ZeroMemory(&bi, sizeof(bi));
bi.hwndOwner = GetSafeHwnd();
bi.pszDisplayName = szDisplayName;
bi.lpszTitle = TEXT("Please select a folder:");
bi.ulFlags = BIF_RETURNONLYFSDIRS;
pidl = SHBrowseForFolder(&bi);
CString sPath;
if (pidl)
{
SHGetPathFromIDList(pidl, szDisplayName); // set the directory name.
sPath = szDisplayName; // m_sPath是CString變量,最後結果在這兒。
}
}
timefg 2001-04-25
  • 打赏
  • 举报
回复
我在乡下,你看怎么办,呵呵
加载更多回复(12)
【前言】 工作或学习中可能需要实现基于VC读\写Excel文件的功能,本人最近也遇到了该问题。中间虽经波折,但是最终还是找到了解决问题的办法。 在此跟大家分享,希望对跟我同样迷茫过的同学们有所帮助。 1、程序功能 1)打开一个excel文件; 2)显示到CListCtrl上; 3)新建一个Excel文件。 以上均在对话框中实现。 2、平台 VC++2010 3、实现方法 常用的Excel打开方式有两种 1)通过数据库打开; 2)OLE方式打开。 由于方式1)操作繁琐,经常出现莫名的错误,这里选用方式2). 4、准备步骤 首先新建一个Dialog窗体程序,添加list control和两个按钮 1)将ExcelLib文件夹拷贝到程序目录下; 2)将Export2Excel.h,Export2Excel.cpp两个文件添加到项目; 3)包含头文件,#include "ExcelLib/Export2Excel.h" 通过以上步骤在程序中引入了可以读取Excle文件的CExport2Excel; 5、打开excel文件 通过按钮点击打开 void CExcelTestDlg::OnBnClickedButtonOpenExcel() { //获取文件路径 CFileDialog* lpszOpenFile; CString szGetName; lpszOpenFile = new CFileDialog(TRUE,"","",OFN_FILEMUSTEXIST|OFN_HIDEREADONLY,"Excel File(*.xlsx;*.xls)|*.xls;*.xlsx",NULL); if (lpszOpenFile->DoModal()==IDOK) { szGetName = lpszOpenFile->GetPathName(); SetWindowText(szGetName); delete lpszOpenFile; } else return; //打开文件 //文件中包含多个sheet时,默认打开一个sheet CExport2Excel Excel_example; Excel_example.OpenExcel(szGetName); //获取sheet个数 int iSheetNum = Excel_example.GetSheetsNumber(); //获取已使用表格行列数 int iRows = Excel_example.GetRowCount(); int iCols = Excel_example.GetColCount(); //获取单元格的内容 CString cs_temp = Excel_example.GetText(1,1); //AfxMessageBox(cs_temp); //List control上显示 //获取工作表列名(第一行) CStringArray m_HeadName; m_HeadName.Add(_T("ID")); for (int i=1;iGetItemCount()>0) { m_list.DeleteColumn(0); } //初始化ClistCtrl,加入列名 InitList(m_list,m_HeadName); //填入内容 //第一行是标题,所以从第2行开始 CString num; int pos; for (int row = 2;row<=iRows; row++) { pos = m_list.GetItemCount(); num.Format(_T("%d"),pos +1); m_list.InsertItem(pos,num); for (int colum=1;columDoModal()==IDOK) { szGetName = lpszOpenFile->GetPathName(); SetWindowText(szGetName); delete lpszOpenFile; } else return; //文件全名称 CString csFileName = szGetName; //需要添加的两个sheet的名称 CString csSheetName = "newSheet"; CString csSheetName2 = "newSheet2"; // 新建一个excel文件,自己写入文字 CExport2Excel Excel_example; //新建excel文件 Excel_example.CreateExcel(csFileName); //添加sheet,新加的sheet在前,也就是序号为1 Excel_example.CreateSheet(csSheetName); Excel_example.CreateSheet(csSheetName2); //操作最开始添加的sheet:(newSheet) Excel_example.SetSheet(2); //添加表头 Excel_example.WriteHeader(1,"第一列"); Excel_example.WriteHeader(2,"第二列"); //添加核心数据 Excel_example.WriteData(1,1,"数据1"); Excel_example.WriteData(1,2,"数据2"); //保存文件 Excel_example.Save(); //关闭文件 Excel_example.Close(); } 7、注意事项 1)一般单个Excel文件包含多个sheet,程序默认打开一个; 2)指定操作sheet,使用Excel_example.SetSheet(2)函数; 3)打开文件时最左侧的sheet序号为1,新建excel时最新添加的sheet序号为1. 【后记】 本程序主要基于网络CSDN中---“Excel封装库V2.0”---完成,下载地址是:http://download.csdn.net/detail/yeah2000/3576494,在此表示感谢!同时, 1)在其基础上作了小改动,改正了几个小错误,添加了几个小接口; 2)添加了如何使用的例子,原程序是没有的; 3)详细的注释 发现不足之处,还请大家多多指教!
' 功 能:不使用控件,对Windows通用对话框进行自定义,核心包括一个封装的和两个模块。 [更新历史] ◆ Ver 1.0.2 开发时间:2008-09-24 09:27 ~ 2008-09-24 12:04 ' 1、修正了没有设置预览或程序标志图片框时,对话框位置无法调整的问题; ' 2、增加了图片预览按比例显示,并显示图片宽x高和预览比例。 ' 3、增加参考资料:VB 取得图片大小 ◆ Ver 1.0.1 开发时间:2008-09-21 17:17 ~ 2008-09-22 17:41 ' 1、增加了字体对话框(预览时,几个下拉框要双击才能立即见到改变,字体颜色无法预览); ' 2、增加了颜色对话框 ' 特别注意:上面的两个对话框没有经过仔细的测试,可能使用时会遇到未知的问题! ' 注意:源代码(贺兰_通用对话框 Ver 1.0.1.rar)中不含参考资料和3张图片,若需要,请参考 Ver 1.0.0 ◆ Ver 1.0.0 开发时间:2008-09-16 15:17 ~ 2008-09-21 16:09 ' CCommonDialog.cls ' 功 能:使用 Windows 通用对话框,如下: ' 0、文件属性对话框 ' 1、打开对话框(可以提供某些文件预览) ' 2、保存对话框 ' 3、字体对话框(预览?) ' 4、颜色对话框 ' Ver 1.0.0 版本,只实现了0、1、2功能,3、4功能以后再做。因为一般打开、保存对话框用得多。 ' MDrawWaves.bas ' 功 能:给定一个Wave文件,画出其波形。 ' MCDHook.bas ' 功 能:对话框预览核心模块,实现回调函数,消息截取处理和其他功能。 ' 注 意:它里面的变量、函数等,一般不需要在外部调用,所有功能基本封装在 CCommonDialog 中。 ' frmMain.frm ' 程序主窗体,演示 CCommonDialog 的各种属性和方法。 还包括以下参考资料: CommonDialog Enhanced Callback PaintPicture VB API创建窗口控件 播放.WAV文件,并显示其波形 打开对话框中选多文件 使用API创建Windows窗口控件 用API实现WINDOWS下的通用对话框 用MCI命令来实现多媒体的播放功能 增强型打开_保存对话框 自定义系统的打开对话框 wave格式详解.txt 常见的影音及图片文件后缀名(按字母顺序排列).txt 利用MFC的CFileDialog生成Windows2000文件对话框.txt 音频文件常见后缀.txt 自定义VB系统控件.txt
1,01.zipMFC Extension LibraryMFC扩展界面库, 使用Visual C++ 6.0(15KB)2,02.zipVisual Studio style UIVisual Studio风格的界面效果(15KB)3,03.zipInternet Explorer 4 style UIIE4.0风格的界面效果(29KB)4,04.zipOutlook Style UIOutlook风格的界面效果(16KB)5,05.zipDynamic child window repositioning动态改变对话框的大小, 对话框中的控件相应改变(15KB)6,06.zipEnhanced list control增强的List控件(43KB)7,07.zipCDialog using animated control在CDialog中使用动画(12KB)8,08.zipOpen Dialog with Bitmap Preview位图预览的打开文件对话框(43KB)9,09.zipStandard file open dialog with preview标准位图预览的打开文件对话框(24KB)10,10.zipBitmap Dialog Class位图对话框(13KB)11,11.zipClass for Browsing shell namespace with your own dialog显示目录的树型结构, 可用于目录选择(31KB)12,12.zipUsing ON_UPDATE_COMMAND_UI with dialogs在对话框中使用ON_UPDATE_COMMAND_UI(13KB)13,13.zipUsing ON_UPDATE_COMMAND_UI with dialogs (2)使用ON_UPDATE_COMMAND_UI(11KB)14,14.zipModeless child dialog in a Main Dialog with corrected tab order非模式对话框在主对话框中的TAB顺序(21KB)15,15.zipCostumizing CFileDialog定制的CFileDialog(22KB)16,16.zipAttaching Elements to Borders一个可以在对话框中改变按纽位置、大小的容器(26KB)17,17.zipScrolling credits dialog滚动信用对话框(12KB)18,18.zipColor Dialog with Persistent Custom Colors对话框继承了上一次的颜色风格(12KB)19,19.zipA Base Dialog Class for Modal/Modeless Dialog with Custom Background Color自定义背景的对话框(13KB)20,20.zipParse IP addresses解析IP地址(12KB)21,21.zipParse phone fields解析电话区域(11KB)22,22.zipChanging the default file open/save dialogs in an MFC doc/view application初始化对话框和支持动态数据交换(DDX)(15KB)23,23.zipDialog with Splash Screen Example Code...Splash对话框的例子(18KB)24,24.zipClass to select directory选择目录(13KB)25,25.zipClass to select directory (Enhancements)增强的选择目录(12KB)26,26.zipDirectory Picker Dialog目录采集对话框(42KB)27,27.zipSimple way to change dialog's background and text colors改变对话框背景颜色和文字颜色的简单途径(11KB)28,28.zipA Simple Dialog Layout Manager一个简单的对话框设计管理器(19KB)29,29.zipUsing Buttons on a Dialog Bar with CCmdUI通过CCmdUI在对话框条中使用按纽(19KB)30,30.zipDisplay help for dialog controls on the status bar在状态条中显示对话框中控件的帮助信息(12KB)31,31.zipDragging a dialog by clicking anywhere on it点击任何地方拖动对话框(11KB)32,32.zipSplash screen with text on it that uses its own thread通过自己的线程在Splash对话框中显示文字(136KB)33,33.zipCreating an expanding dialog创建一个可扩展的对话框(15KB)34,34.zipExpanding/Contracting Dialog Box扩展/缩小对话框(24KB)35,35.zipCFileDialog class that only displays folders让CFileDialog只显示目录(很有用)(2KB)36,36.zipFolder Browsing Dialog目录浏览对话框(3KB)37,37.zipFont dialog with custom text preview & color字体对话框中增加字体和颜色的预览(12KB)38,38.zipEmbedding an HTML Help window into a dialog嵌入一个超文本(HTML)的帮助窗口到对话框中(22KB)39,39.zipDialog which can be used as MDI child window使用MDI子窗口的对话框(13KB)40,40.zipConvert modal dialogs to modeless将模式对话框转换成非模式对话框(12KB)41,41.zipNetscape 4.x Preferences Dialog似Netscape 4.x参数选择的对话框(7KB)42,42.zipHandling OnUpdate() processing for menu itemsOnUpdate()处理菜单项(5KB)43,43.zipOptions Tree Dialog树状的配置对话框(25KB)44,44.zipCustomizing the font dialog定制的字体对话框(4KB)45,45.zipSizable dialogs at its easiest轻松改变对话框的大小(5KB)46,46.zipA Snap Size Dialog Class一个捕获对话框大小的(5KB)47,47.zipCSplitterWnd in a Dialog based Application一个基于对话框的应用(6KB)48,48.zipSplash Screen with 256 color support支持256色的Splash对话框(7KB)49,49.zipSubselection Dialog 子项选择的对话框(5KB)50,50.zipSwitching dialog boxes in a dialog-based application在基于对话框应用中切换对话框(5KB)51,51.zipBetter Tip of the Day dialog典型的Did you konw...对话框(26KB)52,52.zipToolbars and Statusbars on Dialogs在对话框中增加工具条和状态条(7KB)53,53.zipTooltips in modal dialog boxes在模式对话框中实现工具提示(6KB)54,54.zipTooltips for dialog controls实现对话框控件的工具提示(4KB)55,55.zipTransparent Dialog透明的对话框(5KB)56,56.zipViewing Dialog Template Resources at Runtime运行时看对话框模板资源(5KB)57,57.zipAlternative Wizard Dialog一个Wizard对话框, 在安装程序中也有用(5KB)58,58.zipAVLTree实现AVL(Addison-Velski and Landis)树结构(5KB)59,59.zipTemplate class to manipulate bits of undefined type一个操作未知型的模板库(5KB)60,60.zipBlowfish EncryptionBlowfish加密算法加密(4KB)61,61.zipBlowfish encryption classBlowfish加密(5KB)62,62.zipExpression Evaluation数学公式识别(5KB)63,63.zipA Y2.038K-Safe Replacement for CTimeCTime的替换(5KB)64,64.zipIterating through List Containers关于List容器的话题(5KB)65,65.zipLexical Analyser词汇分析(8KB)66,66.zipLocales and Facets in Visual C++VC++的许多细节话题(10KB)67,67.zipA Generalized Parsing Class for MFC一个普通的MFC解析(5KB)68,69.zipCreating Singleton Objects using Visual C++使用VC++创建一个单独的对象(9KB)69,69.zipSmart Pointers and other Pointer classes指针(5KB)70,70.zipSortable CObArray class对CObArray排序(5KB)71,71.zipSortable CObList class对CObList排序(6KB)72,72.zipExtension to the STL find_if and for_each扩充STL库(5KB)73,73.zipChange from child window to popup window (and back) 将一个子窗口改成弹出式窗口(5KB)74,74.zipRestoring Window Position With Multiple Monitors在多层监视器中恢复窗口的位置(5KB)75,75.zipTransparent Window透明的窗口(6KB)76,CenterMDIWnd_demo.zipCenter CMDIChildWnds in the client area of the main frame window(151KB)77,TabbedMDI.zipA variation on the MDI that indicates the open child windows in a tab control. (400KB)78,AdvancedPrev.zipA simple class that helps provide faster Print Preview within MFC Doc/View applications(38KB)79,mditab.zipA dockable bar containing a tabbed list of open windows(91KB)80,CloseUnusedDocs_src.zipClosing unused MDI documents with 1 line of code(2KB)81,graphfx_demo.zipA Doc/View framework for displaying graphical data(192KB)82,WindowsManager.zipImplementing "Windows..." dialog(39KB)83,MultiMRUList_src.zipThis article describes how to maintain the separate MRU list for each document type that is needed in some applications(26KB)84,MultiTop.zipAllows an application to have multiple top-level windows. (22KB)85,PersistFrames.zipA collection of classes that allows MFC SDI and MDI applications to remember the positions and sizes of their main frame and child frame windows. (71KB)86,step0.zipA series of articles that resulted from experimenting with adding Drag and Drop features to my existing application. (16KB)87,undo.zipEasily add Undo/Redo to your CDocument/CView Based Applciation(2KB)88,PropertyView.zipA "Property Sheet"-like view class for MFC (108KB)89,DocViewWTL.zipA library that provides the easiest way to get loosely coupled components. (156KB)90,Dialog2.zipA step by step tutorial showing how to create your first windows program using MFC(112KB)91,MyMDIApp.zipA brief step-by-step tutorial that demonstrates creating an SDI and MDI based applications using the MFC Doc/View architecture.(54KB)92,sditutorial_demo.zipA brief step-by-step tutorial that demonstrates creating an SDI based application that does not use the MFC Doc/View architecture.(15KB)93,QuickWin.zipRedirect stdin, stdout and stderr into a window(125KB)94,GradientTitleBar.zipThis article shows you how to give your Win95/NT4 modeless dialogs a Win98/W2K like gradient title bar.(42KB)95,MsgBoxDemo.zipThe system Message Box that is closed atuomatically after some time(21KB)96,step1.zipSimple step by step article explaining how to create a modeless dialog box as child window.(21KB)97,step2.zipSimple step by step article explaining how to create a modeless dialog box as sibling of the app's main window.(22KB)98,ResizableDialog.zipA CDialog derived class to implement resizable dialogs with MFC (98KB)99,CenterAnywhere_demo.zipThis is a good replacement for CWnd::CenterWindow() that works. (43KB)100,CardDialog.zipA auto-sizing dialog used to store and display smaller child dialogs(22KB)101,scrolling_credits.zipA Scrolling Credits Dialog(209KB)102,snapdialog.zipDialog class that implement a snap-to-screen-border feature like Winamp(16KB)103,messagebox.zipA class which encapsulates MessageBoxIndirect.(18KB)104,rfldlg.zipThis article demonstrates how to add a recent file list to a dialog based application(25KB)105,dialogspl_demo.zipSplash screens are not only for Doc/View based applications(142KB)106,CClockCtrl_src.zipA Freeware MFC class to display an analog clock.(17KB)107,ChildDlg.zipChild Dialog (Sub Forms)(29KB)108,CIconDialog_src.zipA Freeware MFC dialog class to select an icon.(12KB)109,CPushPinFrame_src.zipA Freeware MFC PushPin property page dialog class.(19KB)110,showhide.zipA neat way to show/hide groups of related controls(13KB)111,ResizeCtrl.zipA resize control to implement resizable dialogs with MFC(38KB)112,DDXFile_src.zipA Freeware DDX routine for selecting a filename.(29KB)113,DynWindow_src.zipDescribes a method to implement resizable child windows.(108KB)114,DynamicDialog.zipCreate dialogs dynamically, and easily, without the need for a dialog resource script.(40KB)115,DlgExpand.zipThis article shows gives you the ability to make your dialogs expand or contract, depending on how much information the user wishes to view(15KB)116,TipDemo.zipImproved Tip-of-the-Day Dialog(149KB)117,layoutmgr.zipA framework to provide automatic layout control for dialogs and forms(101KB)118,MainWndPlacement.zipSave/restore the main window size at application exit/startup with a single function call in MDI, SDI and dialog based applications.(29KB)119,sizer_demo.zipAn article on extendable layout management classes(27KB)120,Splasher_src.zipAn improved splash screen component for MFC.(62KB)121,StackDialog.zipCreating a stacked dialog such as Netscape's 'Preferences' dialog(22KB)122,bitmappreviewdialog_src.zipThis article describes a completely object oriented standard file open dialog with preview.(12KB)123,subselect_dialog.zipSubselection Dialog(123KB)124,TabDialog.zipA docking dialog that auto-expands when the mouse passes over it(35KB)125,TcxMsgBox.zipTCX Message Box (derived from CWnd)(35KB)126,ToolTips.zipA demonstration of how to show tooltips in modal dialog bozes(23KB)127,UpdateModalDlg_demo.zipHow to update a modal dialog contents using a callback function(17KB)128,WinampWnd_demo.zipAn article discussing a Plugin for Nullsoft Winamp which looks and behaves like the Winamp UI.(43KB)129,Skins.zipA mini library to build Bitmap based skinnable apps.(174KB)130,FaderWnd_demo.zipAn MFC class to fade any window with only one line of code.(28KB)131,Win2kFileDlg.zipEver wanted to use the new Office 2000 file dialogs on Win 95/98/NT/Me, including the file previewing? Well now you can.(76KB)132,win2000fd.zipHow to show the new Common File Dialog in MFC Apps in Windows 2000(36KB)133,Wizard2000.zipCreate Windows 2000 style Wizards with white backgrounds(109KB)134,FileExportDialog.zipAdding filters to the Open File dialog(24KB)135,customize_dialog.zipCustomizing the Windows Common File Open Dialog(15KB)136,SelectFolder.zipThe windows 'Select Folder' dialog with some extra functionality(41KB)137,animate_dlg.zipAnimated Icon on Titlebar of a Dialog based Application(34KB)138,BmpDlg.zipBitmap Dialog Class(52KB)139,namespace.zipClass for Browsing shell namespace with your own dialog(78KB)140,OnUpdate_demo.zipHandling OnUpdate() processing for menu items(10KB)141,DialogUpdates.zipUsing ON_UPDATE_COMMAND_UI with all controls in a Dialog(18KB)142,override.zipCustomizing the font dialog(4KB)143,cmdlg.zipCostumizing CFileDialog(31KB)144,custom_open.zipCustom Open File or Save as Dialog(25KB)145,ColorFormView.zipCFormView Class with Custom Background Color(33KB)146,Banner.zipAnimated Background Banner(88KB)147,MDIClient.zipA Custom MDI Client Class(42KB)148,html_help_view.zipHTML Help In CView Window(5KB)149,MDIPreview_demo.zipPrint Preview in MDI Frame(20KB)150,zoom_scale.zipAdd Zoom and Scale Capabilities to CScrollView(338KB)151,autopan.zipAuto-Panning Windows(44KB)152,autopan2.zipMicrosoft Internet Explorer like Intellimouse AutoScroll(42KB)153,intellipan.zipIntellimouse panning (improved Auto-Panning Windows)(5KB)154,intellipan2.zipIntellimouse panning 2 (A universal Auto-Panning solution)(12KB)155,bigscroll.zipBreaking the CScrollView 32768 size limitation with CBigScrollView(90KB)156,variable_splitter.zipVariable splitter views(58KB)157,TabbedViews_src.zipTabbed Views(78KB)158,animate_icon_src.zipAnimated Icon on Titlebar of a window(48KB)159,msdi1632.zipMultiSingle (MSDI) Document interface(77KB)160,msdidao.zipMultiSingle (MSDI) Document interface with DAO doc(508KB)161,ScreenSwitch_demo.zipMultiple Views Using SDI(26KB)162,multiview.zipMultiple views for a single document (MDI) 3(86KB)163,WinMenu_demo.zipHome made MDI windows list in Window menu(21KB)164,SdiMulti.zipSDI Interface with Multi-Views and Multi-Splitters(88KB)165,DocViewInDll_demo.zipSeparating the views of an MDI application into different DLLs(60KB)166,MultiFrame_demo.zipMultiple frame windows in SDI application(76KB)167,mrcext.zipResizable Docking Window(862KB)168,sizing.zipSizing TabControlBar(46KB)169,devstudio.zipAnother DevStudio-alike DialogBar(43KB)170,docking.zipResizable Docking Window 2(98KB)171,simple_splitter.zipGeneral Purpose Splitter Class(43KB)172,cxysplitter.zipA pair of splitter classes used in dialogbox(21KB)173,dynamic_splitter.zipSplitter Window - "True" dynamic splitter window(52KB)174,outlook_style.zipOutook Style Splitter Bar(59KB)175,minsplit.zipMinimum size splitter(36KB)176,scrbsplt.zipRemoving and reapplying splitter windows on-the-fly in Scribble with a custom splitter window class(157KB)177,switchviews_in_splitter.zipSwitching views in splitter panes (SDI)(44KB)178,rulers_src.zipImplementing Rulers inside of Splitter Panes(5KB)179,dynamic1.zipDifferent Views In Dynamic Splitter(202KB)180,dialogstartupanimation.zipThis sample shows you how to create dialog startup animation like that of Window 98'menu(18KB)181,yqeditgridcontrol.zipa grid control that enable keyboard input. That is to say, you can write data in it. (31KB)182,switchmdiviews.zipThis sample shows you how to switch from one view to the other in a MDI splitter window application(31KB) 183,yqmdireplaceview.zipThis sample shows you how to replace different views in a MDI splitter window application(36KB) 184,switchview.zipThis sample shows you how to switch from one MDI window to another by using the "Ctrl Tab" key.(29KB) 185,filterreturnkey.zipThis sample shows you how to trap, filter the ENTER and ESCAPE key of a dialog box (17KB)186,filterkey.zipThis sample shows you how to filter a certain key and mask that key(18KB)187,editenter.zipThis sample shows you how to use RETURN key to switch among edit controls of a dialog box(18KB)188,dialoghook.zipThis sample shows you how to set keyboard hook function of a dialog box to trap RETURN ,ESCAPE key.(17KB) 189,contexthelp.zipThis sample shows you how to create context sensitive help of a control of a dialog box(26KB) 190,traparrokey.zipThis sample describes how to trap arrow keys in an control of a dialog box (18KB)191,yqadvancedbtn.zipOwner draw hot button support both bitmap and icon, with flat, gripper property. (108KB)192,drawlistbo.zipOwner draw CTabCtrl with flat gripper property (40KB)193,startupanimation.zipCreate Window startup animation, including several kind of animation style, very interesting(23KB) 194,flatlistbox.zipusing a unique way to implement flat attribute( other than those published on the codegurn), as well as hot ,gripper attribute.(21KB) 195,yqhoteditctrl.zipCreate edit control with Hot , flat, gripper. separator attributes (21KB)196,3dmdishadow.zipCreate 3D shadow of a MDI frame windows(32KB) 197,3dsdishadow.zipCreate 3D shadow of a SDI frame windows(29KB)198,getfile.zipA DDX routine for MFC to retrieve filenames(29KB)199,splasher.zipAn improved splash screen component for MFC(62KB)200,pushpin.zipA pushpin button MFC class(12KB)201,getfolder.zipA DDX routine for MFC to retrieve folders(30KB)202,ntray.zipAn MFC class to manipulate tray icons(17KB)203,hlinkctrl.zipAn MFC class to support hyperlinks on windows and dialogs(16KB)204,icondialog.zipAn icon selection dialog class for MFC(12KB)205,pushpinframe.zipAn MFC class to provide property dialogs ala Developer Studio(16KB)206,mappin.zipAn MFC class to implement map pins(286KB)207,iconcombobox.zip2 MFC classes to implement icon selection combo boxes(19KB)208,menuex_demo.zipImplementing an Ownerdrawn menu (35KB)209,bcmenu261.zipCool Owner Drawn Menus with BitmapsVersion 2.61(70KB)210,dynmenu.zipSome handy functions for adding and deleting submenus and menuitems in runtime (16KB)211,gradientmenu.zipCreate Popup menus in MFC with a gradient and text on the left side (89KB)212,menuicon_demo.zipGive your apps a unique look by adding a logo to your menu(48KB)213,bcgbappwizard.zipBCGControlBar library version 4.6(2121KB)214,mpcstatusbar.zipAn enhanced CStatusBar to easily and dynamically add/remove controls on a status bar (48KB)215,textonlystatusbar.zipAn easy to use and implement Text Only Status Bar with Tool tip text extracted from the status bar panes. (39KB)216,progressbar.zipShowing progress bar in a status bar pane(33KB)217,sizecbar_src.zipDevStudio-like docking window (64KB)218,sizing_tabct1_demo.zipCreates a dockable and resizable control bar. (46KB)219,dockview.zipA fairly simple way to incoporate views into sizing control bars(69KB)220,spin_slide_toolbar.zipHow to create toolbars with spinners and/or sliders(48KB)221,tearoffrebars_prj.zipThis article Implements the functionality similar to the Office 2000 toolbars(26KB)222,flatbar.zipA flat toolbar implementation that does not require the updated common controls library from Internet Explorer. (197KB)223,toolbar_droparrow_demo.zipDemonstrates how to use the new toolbar styles to add dropdown arrows to toolbar buttons (28KB)224,dynamictb.zipA simple tutorial that shows how to dynamically replace toolbars at runtime (35KB)225,toolbar_docking_demo.zipDemonstrates how to dock toolbars side-by-side (29KB)226,tapetoolbar.zipA spectacular variation on toolbars (35KB)227,chevions.zipAn introduction to using the cool new toolbar chevrons (18KB)228,toolgroupmanager.zipA reusable template class for managing multiple toolbars, only one of which is displayed at a time(30KB)229,toolbar_hotbuttons_demo.zipDemonstrates how to add rollover buttons to your toolbar(30KB)230,toolbar.zipWTL Tool Bar Drop-Down Extension(64KB)231,win95asm.zipIntroduction to Menus(113KB)232,outbar.zipCGfxOutBarCtrl, an Outlook98 bar-like control(163KB)233,tabstatus.zipAdvanced UI - MDI list in the status bar (and a custom Window List dialog)(62KB)234,gfxlist.zipList Control - Enhanced list control(1544KB)235,maillook.zipInternet Mail Look(42KB)236,cdxcdynamic.zipDynamic child window repositioning for dialogs, property sheets, form views and any other CWnd derived classes. (227KB)237,voicecmd.zipVoice Command Enabling Your Software (27KB)238,cj60lib.zipMFC Extension Library - CJ60 Version 6.07(1100KB)239,infobar.zipInformation Bar (62KB)240,switcher.zipA Switcher Control (like the Windows Task Bar) (40KB)
1,pic_open.zip带位图预览的打开文件对话框(4KB)2,bmpdlg.zip一个位图对话框 (11KB)3,folder.zip只显示文件夹信息的文件对话框(2KB)4,dir_pic.zip文件目录搜集工具对话框(42KB)5,splash.zip通过自己的线程在Splash对话框中显示文字(136KB)6,res_dlg.zip大小可调的对话框(21KB)7,splitter.zip可变的分割视图(58KB)8,anicon1.zip在窗口的标题条上显示动画图标演示程序(47KB)9,anicon2.zip在窗口的标题条上显示动画图标(2KB)10,simple.zip一般用途的分隔器(43KB)11,outlook.zipOutLook风格的分隔条(59KB)12,appbar1.zip实现桌面的工具条(AppBar)(12KB)13,appbar2.zip实现桌面的工具条演示程序(AppBar)(88KB)14,trayicon1.zip屏幕保护托盘图标(SDK版本)(27KB)15,trayicon2.zip屏幕保护托盘图标(MFC版本)(30KB)16,cj60lib.zipMFC扩展界面库(VC6升级版)(936KB)17,devstudio.zipVisual Studio风格的用户界面(132KB)18,explorer.zipVisual Studio风格的用户界面(213KB)19,outlook1.zipOutLook风格的用户界面(134KB)20,Ccaption.zip一组用于定制窗口标题的(36KB)21,Ccaption2.zip一组用于定制窗口标题的演示程序(79KB)22,treectrl1.zipDirTreeCtrl--显示文件夹和文件演示程序(56KB)23,treectrl2.zipDirTreeCtrl--显示文件夹和文件(6KB)24,menutip.zip实现菜单的工具提示(33KB)25,menubar1.zipDevStudio样式的泊位菜单条演示程序(不用MSIE)(58KB)26,menubar2.zipDevStudio样式的泊位菜单条(不用MSIE)(27KB)27,propbox1.zip实用的属性列表框(5KB)28,propbox2.zip实用的属性列表框演示程序(25KB)29,cchecklist.zip一个多层次的CCheckListBox(18KB)30,popchild.zip 在Popup和Child窗口之间转化(43KB)31,multitop.zip 一个SDI(单文档界面)的应用,通过File菜单中的Create New Frame命令能够创建一个位于顶层的SDI应用,但关闭主应用后其它的窗口也将关闭,程序由Visual C++ 5.0开发(30KB)32,picknew.zip 演示如何注册多文档模板且避免MFC自动产生的"New File Type"对话框,程序由Visual C++ 5.0开发,调用了CDocTemplate::OpenDocumentFile()(49KB)33,listbox1.zip一个似VisualStudio样式的列表框(17KB)34,listbox2.zip一个似VisualStudio样式的列表框演示程序(50KB)35,custfile.zip 这个例子能够在CFileDialog中增加一对按纽,需要使用Visual C++ 6.0(23KB)36,icondlg.zip 这是一个从资源DLL中选取图标的对话框(12KB)37,Modal.zip 创建一个模式的窗口(38KB)38,dock_menu.zip 演示如何实现DevStdio中的菜单风格,值得研究 COOL(157KB)39,tooltip.zip 可以多行显示的提示条,且颜色可变(32KB)40,ntray.zip 你想知道拨号网络连通后的动态小图标(Tray Icons)是怎么实现的吗?这个例子可以告诉你一切 COOL(17KB)41,w95tray.zip Windows95 Tray Icon的例子(9KB)42,startmenu.exe 修改Start菜单(27KB)43,splits.zip 这个由Visual C++ 5.0开发的程序演示如何管理View中的切分窗口,用到了CSplitterWnd::DeleteView()和CSplitterWnd::CreateView()等成员函数(35KB)44,swt.zipDOS下仿WIN95界面及图标编辑器源程序(498k C&ASM 作者:添翼虎)(499KB)45,menutest.zip定制WIN95图形菜单演示程序(12KB)46,toolbar1.zip在ToolBar中嵌入CListBox(39KB)47,fromto.zip从一图退到另一图(54KB)48,cj60libsrc.zip界面开发库Cj60Lib的源程序(268KB)49,password.zip 拖动放大镜到密码输入框能得到密码的内容 COOL(15KB)50,ProperWnd.zip 属性页放置在窗口的指定位置(58KB)51,pushpin.zip在属性页的左边加入一个图钉按纽,熟悉Microsoft Developer Stdio的朋友一定很熟悉(16KB)52,apibrow.zip这个例子使用公用控制回调在一个CListView中管理CListCtrl控制,这个例子用于分析了一些以逗号为分割符的文本文件,例如在你的\MSDEV\LIB(VC5.0在DevStudio\VC\Lib)目录下的Win32Api.CSV就是这样的文件(16KB)53,scrl.zip这是一个由Visual C++ 5.0开发的基于对话框的应用,它演示如何使用CListCtrl::Scroll()函数,它是CListView的report方式的一个子集(14KB)54,treelist1.zip显示资源管理器风格的目录树结构的例子(64KB)55,list_menu.zip 在ToolBar中嵌入CListBox,看起来像图形菜单(39KB)一个图标处理程序的源代码,支持对ICON多种特效处理,能在EXE,DLL文件中取出ICON文件,并能将BMP文件转化为ICON,本程序也是个很酷的工具(117KB)58,ctrbars.zip 一个简单的工具条的程序例子(18KB)59,cj60.zip似于Developer Studio,Explore界面的库(165KB)60,cj601.zip似于Developer Studio,Explore界面的库(95KB)61,cj602.zip似于Developer Studio,Explore界面的库(100KB)62,fileNew.zip文件更新事件演示程序(37KB)63,CfileNew.zip文件更新事件(4KB)64,outbar.zip似OutLook左边按钮条的控件(163KB)65,waitdialog.zip等待对话框(22KB)66,coolmenu.zipOffice 97风格菜单实现(298KB)67,dirpk.exe目录选择对话(78KB)68,docktest.zip演示Docking Window(220kb)69,drivevie.zip查看系统安装的驱动器(34kb)70,enhstbar.zip在状态条上显示按钮和进度指示条(88kb)71,fully.zip全屏幕显示窗口例子程序(42kb)72,icondial.zip在对话框内显示图标列表(12kb)73,mfccmd.zip多重Undo/Redo实现(90kb)74,mfcdde.zipDDE实例(53kb)75,splasher.zip启动屏幕程序(47kb)76,toolbar.zip一个工具条的例子(174kb)77,vwrplc32.exe文档视图结构实例(42KB)78,ModalWin.zip一个多文档的例子(1880kb)79,HTMViewer.ziphtml文件浏览器(1870kb)80,picwin.zip给任意窗口添加背景(2KB)81,DynCon.zip动态改变对话框的大小, 对话框中的控件相应改变(166KB)82,tabstatus.zip在多文档应用程序的状态条中加入子窗口的列表, 使程序的状态条有点像Windows 95的任务条(62KB)83,jpeg.zip操作JPEG的库和源程序(390KB)84,dibimage.zip这个例子功能强大,能够以多种方式处理位图文件,强烈推荐 COOL(112KB)85,voicecmd.zip在你的软件中增加语音控制功能COOL(31KB)86,pathDlg.zip能够选择和创建文件夹的对话框(22KB)87,AniDlg.zip想作动态对话框吗?下载一个回去看看吧!(18KB)88,dlgtbar.zip想在对话框中实现浮动工具栏吗?这个代码是你的最佳选择。(19KB)89,DlgMenu.zip教你在对话框中加入菜单,一学就会。(26KB)90,fold.zip使用相当简单,实现文件夹浏览,里面附带英文说明。(4KB)91,CoolAbout.zip支持滚动文字图象,并可用鼠标操作方向。(26KB)92,FullDlg.zip用这你可以实现全屏对话框,并且你用它可以切换到运行的其它应用程序中。(3KB)93,Colorsrc.zip一个很漂亮的颜色选择。(157KB)94,TabDialog.zip能将对话框“钉”在屏幕上。(36KB)95,tip_ocx.zip你有没有觉得VC提供的那个Tip of the day控件很简陋?现在好了,Michael Walz带给我们一个Visual Studio那样的界面漂亮的Tip of the day。(26KB)96,PathPic.zip这个库提供了选择目录的功能,比通用的CFileDialog好多了。(20KB)97,twopanes.zip你有没有想过把通用对话框作为你的窗口的一个View是什么样子的?看看这个例子吧。(9KB)98,bcmenu21.zip可以利用工具条资源,绘制图标菜单。(56KB)99,MENU4_MDI.ZIP可以利用工具条资源,自动绘制图标菜单,MDI版本。(62KB)100,MENU4_SDI.ZIP可以利用工具条资源,自动绘制图标菜单,SDI版本。(61KB)101,toolbar2.zip这个程序演示了如何利用工具栏的新特性,在工具栏中的某个按钮加入下拉式的列表。(28KB)102,avi_bar.zip可以在状态栏里加入一个AVI动画。(34KB)103,outlook.zip这个库使你可以创建象OutLook那样的切分窗口。(59KB)104,cxysplit.zip这是一个可以在DialogBox中使用的切分库。(21KB)105,AutoWnd.zip自动切分一个视图,并且高亮显示具有输入焦点的视图。(31KB)106,MyWnd.zip高亮显示具有输入焦点的视图。(2KB)107,bhagat.zip使用一个简单的函数调用就可以在切分视图中动态创建任何型的新视图。(64KB)108,MSDNWnd.zip这是一个MSDN中的切分窗口的例子,虽不怎么样但已经完整展示了切分操作。对于初学者是一个很好的参考。(37KB)109,rulers.zip使用固定大小的切分窗口(上面、左边部分)在视图中加入标尺。(就象Photoshop中的标尺那样)酷极了。(5KB)110,VisualFx.zip使用固定大小的切分窗口(上面、左边部分)在视图中加入标尺。(就象Photoshop中的标尺那样)酷极了。(88KB)111,infobar.zip定制了一个与outlook,outlook express相同的信息条。(16KB)112,BCGB.zipBCGControlBar的AppWizard,编译运行之后你在new的时候就可以选择使用BCGControlBar界面风格了。你最好与BCGControlBar一起下载使用。(215KB)113,sizecbar.zip支持浮动窗体的库,使用它你可以轻松的做出象Visual Studio那样的界面来。(65KB)114,Coolocx.zip所有你能想到的控件一个都不能少,全都是浮动的效果乃至连Windows通用对话框都浮动。(62KB)115,fullscreen.zip让你轻松实现全屏显示的代码,很简单轻易更可上手,告诉你,全屏时你还可以保留工具条。(22KB)116,sys_tray.zip完全封装windows任务栏,使用此可以轻松操作任务栏图标及其菜单功能。(51KB)117,regester.zip封装有关注册表操作的函数,使你可以轻松添加、删除、修改主键或键值。(2KB)118,bmpdraw.zip可以用bmp文件构造该,不须在设计时将bmp文件加入到资源中去。其它功能多多。(5KB)119,split.zip从中可以学习CFile的使用方法。(39KB)120,strange.zip用VC++实现异形窗口(234KB)121,csh.zip在对话框中实现提示条风格的上下文敏感帮助(75KB)122,whfname.zip从窗口句柄中得到文件名(6KB)

16,472

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧