?? columnselectdlg.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 + -