a
This commit is contained in:
@@ -0,0 +1,137 @@
|
||||
// opexectd2dsptseldlg.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "geomative.h"
|
||||
#include "opexectd2dsptseldlg.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// COpExecTd2DSptSelDlg dialog
|
||||
|
||||
|
||||
COpExecTd2DSptSelDlg::COpExecTd2DSptSelDlg(CWnd* pParent /*=NULL*/)
|
||||
: CDialog(COpExecTd2DSptSelDlg::IDD, pParent)
|
||||
{
|
||||
//{{AFX_DATA_INIT(COpExecTd2DSptSelDlg)
|
||||
// NOTE: the ClassWizard will add member initialization here
|
||||
//}}AFX_DATA_INIT
|
||||
}
|
||||
|
||||
|
||||
void COpExecTd2DSptSelDlg::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(COpExecTd2DSptSelDlg)
|
||||
DDX_Control(pDX, IDC_TD_SPT, m_sptList);
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(COpExecTd2DSptSelDlg, CDialog)
|
||||
//{{AFX_MSG_MAP(COpExecTd2DSptSelDlg)
|
||||
ON_WM_SIZE()
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// COpExecTd2DSptSelDlg message handlers
|
||||
|
||||
BOOL COpExecTd2DSptSelDlg::OnInitDialog()
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
// TODO: Add extra initialization here
|
||||
|
||||
CString strColTitle;
|
||||
int iColIndex = (int)VAL_ZERO;
|
||||
|
||||
m_sptList.SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_HEADERDRAGDROP
|
||||
| LVS_EX_ONECLICKACTIVATE | LVS_EX_GRIDLINES);
|
||||
|
||||
strColTitle.Empty();
|
||||
strColTitle.LoadString(IDS_DB_SCON_CN);
|
||||
m_sptList.InsertColumn(iColIndex, strColTitle, LVCFMT_LEFT, 150);
|
||||
|
||||
iColIndex++;
|
||||
strColTitle.Empty();
|
||||
strColTitle.LoadString(IDS_DB_SCON_SNAME);
|
||||
m_sptList.InsertColumn(iColIndex, strColTitle, LVCFMT_LEFT, 150);
|
||||
|
||||
iColIndex++;
|
||||
strColTitle.Empty();
|
||||
strColTitle.LoadString(IDS_DB_SCON_EAMOUNT);
|
||||
m_sptList.InsertColumn(iColIndex, strColTitle, LVCFMT_LEFT, 110);
|
||||
|
||||
iColIndex++;
|
||||
strColTitle.Empty();
|
||||
strColTitle.LoadString(IDS_DB_SCON_CHAMOUNT);
|
||||
m_sptList.InsertColumn(iColIndex, strColTitle, LVCFMT_LEFT, 115);
|
||||
|
||||
iColIndex++;
|
||||
strColTitle.Empty();
|
||||
strColTitle.LoadString(IDS_DB_SCON_TPAMOUNT);
|
||||
m_sptList.InsertColumn(iColIndex, strColTitle, LVCFMT_LEFT, 95);
|
||||
|
||||
iColIndex++;
|
||||
strColTitle.Empty();
|
||||
strColTitle.LoadString(IDS_DB_SCON_DEFINER);
|
||||
m_sptList.InsertColumn(iColIndex, strColTitle, LVCFMT_LEFT, 120);
|
||||
|
||||
iColIndex++;
|
||||
strColTitle.Empty();
|
||||
strColTitle.LoadString(IDS_DB_SCON_DEDATE);
|
||||
m_sptList.InsertColumn(iColIndex, strColTitle, LVCFMT_LEFT, 120);
|
||||
|
||||
iColIndex++;
|
||||
strColTitle.Empty();
|
||||
strColTitle.LoadString(IDS_DB_SCON_DESC);
|
||||
m_sptList.InsertColumn(iColIndex, strColTitle, LVCFMT_LEFT, 150);
|
||||
|
||||
CRect rect;
|
||||
GetClientRect(&rect);
|
||||
|
||||
if (m_sptList)
|
||||
{
|
||||
m_sptList.MoveWindow(rect);
|
||||
}
|
||||
|
||||
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
// EXCEPTION: OCX Property Pages should return FALSE
|
||||
}
|
||||
|
||||
BOOL COpExecTd2DSptSelDlg::PreTranslateMessage(MSG* pMsg)
|
||||
{
|
||||
// TODO: Add your specialized code here and/or call the base class
|
||||
if(pMsg->message==WM_KEYDOWN && pMsg->wParam==VK_RETURN)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if(pMsg->message==WM_KEYDOWN && pMsg->wParam==VK_ESCAPE)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
return CDialog::PreTranslateMessage(pMsg);
|
||||
}
|
||||
|
||||
void COpExecTd2DSptSelDlg::OnSize(UINT nType, int cx, int cy)
|
||||
{
|
||||
CDialog::OnSize(nType, cx, cy);
|
||||
|
||||
// TODO: Add your message handler code here
|
||||
CRect rect;
|
||||
GetClientRect(&rect);
|
||||
|
||||
if (m_sptList)
|
||||
{
|
||||
m_sptList.MoveWindow(rect);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user