funddialog.cpp

来自「这是一个股票系统」· C++ 代码 · 共 66 行

CPP
66
字号
// FundDialog.cpp : 实现文件
//

#include "stdafx.h"
#include "STU3901070115.h"
#include "FundDialog.h"
#include "MainFrm.h"
#include "STU3901070115Doc.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()
{
	CMainFrame * pWnd = 
		dynamic_cast< CMainFrame * > (AfxGetMainWnd());
	ASSERT_VALID( pWnd );
	
	CSTU3901070115Doc * pDoc = 
		dynamic_cast< CSTU3901070115Doc * >( 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);
	
	

	// TODO: 在此添加控件通知处理程序代码
}

⌨️ 快捷键说明

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