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

📄 columnselectdlg.cpp

📁 一个电视台专用的信息管理软件源代码
💻 CPP
字号:
// ColumnSelectDlg.cpp : implementation file
//

#include "stdafx.h"
#include "tvnews.h"
#include "ColumnSelectDlg.h"
#include "UserChannel.h"
#include "Column.h"
#include "ReporterDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CColumnSelectDlg dialog


CColumnSelectDlg::CColumnSelectDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CColumnSelectDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CColumnSelectDlg)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CColumnSelectDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CColumnSelectDlg)
	DDX_Control(pDX, IDC_COMBO1, m_cmbUPColumn);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CColumnSelectDlg, CDialog)
	//{{AFX_MSG_MAP(CColumnSelectDlg)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CColumnSelectDlg message handlers

BOOL CColumnSelectDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	m_UserID=theApp.m_user.GetUID();
	CUserChannel userChannel;

	int m_ChannelID = userChannel.GetChannelIDByUserID(m_UserID);

	
	CColumn column;
	CStringArray allColumns;
	column.GetAllColumn(allColumns,m_ChannelID);

	for(int i=0;i<allColumns.GetSize();i++)
	{
		m_cmbUPColumn.AddString(allColumns.GetAt(i));	
	}
	
	m_cmbUPColumn.SetCurSel(0);

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

void CColumnSelectDlg::OnOK() 
{
	// TODO: Add extra validation here
	CReporterDlg reporterDlg;
	CString strColumn;

	int iColumnSel=m_cmbUPColumn.GetCurSel();
	m_cmbUPColumn.GetLBText(iColumnSel,strColumn);
	reporterDlg.ColumnName = strColumn;
	CDialog::OnOK();

	reporterDlg.DoModal();
	
	
}

void CColumnSelectDlg::OnCancel() 
{
	// TODO: Add extra cleanup here
	
	CDialog::OnCancel();
}

⌨️ 快捷键说明

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