wzdfldlg.cpp

来自「MFC扩展编程实例」· C++ 代码 · 共 65 行

CPP
65
字号
// WzdFlDlg.cpp : implementation file
//

#include "stdafx.h"
#include "wzd.h"
#include <dlgs.h>
#include "WzdFlDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CWzdFileDialog

IMPLEMENT_DYNAMIC(CWzdFileDialog, CFileDialog)

CWzdFileDialog::CWzdFileDialog(BOOL bOpenFileDialog, LPCTSTR lpszDefExt, LPCTSTR lpszFileName,
		DWORD dwFlags, LPCTSTR lpszFilter, CWnd* pParentWnd) :
		CFileDialog(bOpenFileDialog, lpszDefExt, lpszFileName, dwFlags, lpszFilter, pParentWnd)
{
}


BEGIN_MESSAGE_MAP(CWzdFileDialog, CFileDialog)
	//{{AFX_MSG_MAP(CWzdFileDialog)
	ON_BN_CLICKED(IDC_WZD_BUTTON, OnWzdButton)
	ON_CBN_DROPDOWN(IDC_WZD_COMBO, OnDropdownWzdCombo)
	ON_CBN_CLOSEUP(IDC_WZD_COMBO, OnCloseupWzdCombo)
	//}}AFX_MSG_MAP

END_MESSAGE_MAP()

// CFileDialog control ids
// NOTE: You may have to experiment to find the right id for a control
// NOTE: Be warned that the ids and even the controls may change in the future
//#define psh1-12    // push buttons
//#define chx1-12    // checkboxes
//#define rad1-12    // radio buttons
//#define grp1-12    // group boxes
//#define stc1-12    // statics
//#define lst1-12    // listboxes/views
//#define cmb1-12    // comboboxes
//#define edt1-12    // edit boxes
//#define scr1-12    // scrollbars


void CWzdFileDialog::OnWzdButton() 
{
	SetControlText(edt1, "hello");
	HideControl(lst1);
}

void CWzdFileDialog::OnDropdownWzdCombo() 
{
	
}

void CWzdFileDialog::OnCloseupWzdCombo() 
{
	
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?