📄 slabstackmformview.cpp
字号:
// SlabStackMFormView.cpp : implementation file
//
#include "stdafx.h"
#include "mestang.h"
#include "SlabStackMFormView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSlabStackMFormView
IMPLEMENT_DYNCREATE(CSlabStackMFormView, CFormView)
CSlabStackMFormView::CSlabStackMFormView()
: CFormView(CSlabStackMFormView::IDD)
{
//{{AFX_DATA_INIT(CSlabStackMFormView)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
CSlabStackMFormView::~CSlabStackMFormView()
{
}
void CSlabStackMFormView::DoDataExchange(CDataExchange* pDX)
{
CFormView::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CSlabStackMFormView)
DDX_Control(pDX, IDC_LIST_SLAB_STACK_RECORD, m_list_slab_stack_record);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CSlabStackMFormView, CFormView)
//{{AFX_MSG_MAP(CSlabStackMFormView)
ON_WM_DESTROY()
ON_BN_CLICKED(ID_STACK_REFRESH, OnStackRefresh)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSlabStackMFormView diagnostics
#ifdef _DEBUG
void CSlabStackMFormView::AssertValid() const
{
CFormView::AssertValid();
}
void CSlabStackMFormView::Dump(CDumpContext& dc) const
{
CFormView::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CSlabStackMFormView message handlers
void CSlabStackMFormView::OnInitialUpdate()
{
CFormView::OnInitialUpdate();
//设置LIST_SLAB_HIS的框架大小
m_list_slab_stack_record.SetWindowPos(NULL,0,0,1242,316,SWP_NOMOVE|SWP_NOZORDER | SWP_NOACTIVATE);
m_list_slab_stack_record.SetExtendedStyle(LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES|LVS_EX_INFOTIP | LVS_EDITLABELS);
m_list_slab_stack_record.SetBkColor(RGB(224,255,255));
m_list_slab_stack_record.SetTextBkColor(RGB(230 ,230 ,250));
m_list_slab_stack_record.SetTextColor(RGB(85 ,26 ,139 ));
//设置列表框LIST_SLAB_HIS标题名字
int k=0;
m_list_slab_stack_record.InsertColumn(k++,"垛位",LVCFMT_CENTER,100);
m_list_slab_stack_record.InsertColumn(k++,"列",LVCFMT_CENTER,100);
m_list_slab_stack_record.InsertColumn(k++,"位置",LVCFMT_CENTER,100);
m_list_slab_stack_record.InsertColumn(k++,"炉号",LVCFMT_CENTER,100);
m_list_slab_stack_record.InsertColumn(k++,"块数",LVCFMT_CENTER,100);
//设置列表框控件字体
CFont m_ListFont;
m_ListFont.CreateFont(16,0,0,0,FW_NORMAL, 0,0,0,DEFAULT_CHARSET, OUT_CHARACTER_PRECIS, CLIP_CHARACTER_PRECIS,DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Times New Roman");
m_list_slab_stack_record.SetFont(&m_ListFont);
//初始化读取垛位信息
theApp.open_mes();
resultset &rs_stack = *(theApp.cn).select ("select * from STOCK_INF order by ID ASC");
Stack_List_Update(m_list_slab_stack_record,rs_stack);
theApp.cn.close();
UpdateData(false);
}
void CSlabStackMFormView::OnDestroy()
{
CFormView::OnDestroy();
// TODO: Add your message handler code here
}
void CSlabStackMFormView::OnStackRefresh()
{
// TODO: Add your control notification handler code here
//刷新读取垛位信息
m_list_slab_stack_record.DeleteAllItems();
theApp.open_mes();
resultset &rs_stack = *(theApp.cn).select ("select * from STOCK_INF order by ID ASC");
Stack_List_Update(m_list_slab_stack_record,rs_stack);
theApp.cn.close();
UpdateData(false);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -