rect;
GetClientRect(&rect);
int x = (rect.Width() - cxIcon + 1) / 2;
int y = (rect.Height() - cyIcon + 1) / 2;
// Draw the icon
dc.DrawIcon(x, y, m_hIcon);
}
else
{
CDialog::OnPaint();
}
}
// The system calls this to obtain the cursor to display while the user drags
// the minimized window.
HCURSOR CData_Disp2Dlg::OnQueryDragIcon()
{
return (HCURSOR) m_hIcon;
}
void CData_Disp2Dlg::OnButtonFont()
{
// TODO: Add your control notification handler code here
CFontDialog dlg;
dlg.DoModal();
}
void CData_Disp2Dlg::OnCheckWidth()
{
// TODO: Add your control notification handler code here
_variant_t vIndex;
if(m_checkWidth == 0)
{
for(int i=0;i<5;i++)
{
vIndex = long(i);
m_dbTest.GetColumns().GetItem(vIndex).SetWidth(40);//宽度
}
m_checkWidth =1;
}
else
{
OnInitDialog();
m_checkWidth = 0;
}
UpdateData(FALSE);
}
void CData_Disp2Dlg::OnCheckFormat()
{
// TODO: Add your control notification handler code here
_variant_t vIndex;
if(m_checkFormat == 0)
{
int i=2;
{
vIndex = long(i);
m_dbTest.GetColumns().GetItem(vIndex).SetNumberFormat(_T("0.0%")); //设置百分数
}
m_checkFormat =1;
}
else
{
OnInitDialog();
m_checkFormat = 0;
}
UpdateData(FALSE);
}
void CData_Disp2Dlg::OnCheckMulline()
{
// TODO: Add your control notification handler code here
_variant_t vIndex;
if(m_checkMulline == 0)
{
int i=0;
{
vIndex = long(i);
m_dbTest.GetColumns().GetItem(vIndex).SetWrapText(TRUE); //设置百分数
}
m_checkMulline =1;
}
else
{
OnInitDialog();
m_checkMulline = 0;
}
UpdateData(FALSE);
}
void CData_Disp
上一篇:
FileView.frm
下一篇:
那些令你为之触动的好句子,感慨万分