⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 funddialog.cpp

📁 实现了简单的MFC界面
💻 CPP
字号:
// FundDialog.cpp : 实现文件
//

#include "stdafx.h"
#include "ST3901070422.h"
#include "FundDialog.h"
#include "MainFrm.h"
#include "ST3901070422Doc.h"


// CFundDialog 对话框

IMPLEMENT_DYNAMIC(CFundDialog, CDialog)

CFundDialog::CFundDialog(CWnd* pParent /*=NULL*/)
	: CDialog(CFundDialog::IDD, pParent)
{

}

CFundDialog::~CFundDialog()
{
}

void CFundDialog::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	DDX_Control(pDX, IDC_FUNDLIST, m_listBox);
}


BEGIN_MESSAGE_MAP(CFundDialog, CDialog)
	ON_LBN_SELCHANGE(IDC_FUNDLIST, &CFundDialog::OnLbnSelchangeFundlist)
END_MESSAGE_MAP()


// CFundDialog 消息处理程序

void CFundDialog::OnLbnSelchangeFundlist()
{
	// TODO: 在此添加控件通知处理程序代码
	CMainFrame * pWnd = 
		dynamic_cast< CMainFrame * > (AfxGetMainWnd());
	ASSERT_VALID( pWnd );
	
	CST3901070422Doc* pDoc = 
		dynamic_cast< CST3901070422Doc * >( pWnd->GetActiveDocument());
	ASSERT_VALID( pDoc );
	
	CString strCurFund;
	
	int sel = m_listBox.GetCurSel();
	
	if( sel == LB_ERR ) sel = 0;
	
	m_listBox.GetText( sel, strCurFund );
	
	pDoc->SetCurrentFund( strCurFund );
	
	pDoc->UpdateAllViews( NULL );

	pDoc->SetModifiedFlag(true);

}

⌨️ 快捷键说明

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