dc.GetSafeHdc(), 0);
// Center icon in client rectangle
int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);
CRect rect;
Get
ClientRect(&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 CEx12_03AppDlg::OnQueryDragIcon()
{
return (HCURSOR) m_hIcon;
}
void CEx12_03AppDlg::OnAdd()
{
// TODO: Add your control notification handler code here
UpdateData(true);
CSquareCal cal;
m_result=cal.MyAdd(m_x,m_y);
UpdateData(false);
}
void CEx12_03AppDlg::OnMinus()
{
// TODO: Add your control notification handler code here
UpdateData(true);
CSquareCal cal;
m_result=cal.MyMinus(m_x,m_y);
UpdateData(false);
}