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

📄 instfundlg.cpp

📁 一种简单的股票软件源代码,编译后可以实时显示证券行情
💻 CPP
字号:
// InstFunDlg.cpp : implementation file
//

#include "stdafx.h"
#include "MyStock.h"
#include "InstFunDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CInstFunDlg dialog


CInstFunDlg::CInstFunDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CInstFunDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CInstFunDlg)
	//}}AFX_DATA_INIT
}


void CInstFunDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CInstFunDlg)
	DDX_Control(pDX, IDC_LIST2, m_list2);
	DDX_Control(pDX, IDC_EDIT1, m_edit);
	DDX_Control(pDX, IDC_LIST1, m_list1);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CInstFunDlg, CDialog)
	//{{AFX_MSG_MAP(CInstFunDlg)
	ON_LBN_SELCHANGE(IDC_LIST2, OnSelchangeList2)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CInstFunDlg message handlers

BOOL CInstFunDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();

	ftab=new FunTable[3];
	ftab[0].fun="AAA";
	ftab[1].fun="BBB";
	ftab[2].fun="CCC";
	ftab[0].str="123";
	ftab[1].str="456";
	ftab[2].str="789";

	m_list2.AddString(ftab[0].fun);
	m_list2.AddString(ftab[1].fun);
	m_list2.AddString(ftab[2].fun);

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CInstFunDlg::OnSelchangeList2() 
{
	int n=m_list2.GetCurSel();
	str=ftab[n].str;
	m_edit.SetWindowText(str);
	
}

⌨️ 快捷键说明

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