// Center icon in client rectangle
int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);
CRect 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
{
if(m_bIsShow)//位图已输出的话,遮住就重绘
Draw();
CDialog::OnPaint();
}
}
/*void COKDlg::OnButton1()
{
// TODO: Add your control notification handler code here
Draw();