Article ID: 142226
Article Last Modified on 11/21/2006
/* compile options needed: default
*/
BOOL CAboutDlg::OnInitDialog()
{
CDialog::OnInitDialog();
if ( (BYTE)GetVersion() >=4 )
{
m_hIcon = AfxGetApp()->LoadIcon(IDI_ICON1);
if (NULL != m_hIcon)
{
m_ok.ModifyStyle(0, BS_ICON);
m_ok.SetIcon(m_hIcon);
}
}
else
m_hIcon = NULL;
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CAboutDlg::OnDestroy()
{
CDialog::OnDestroy();
// destroy the icon if it was loaded
if (NULL != m_hIcon)
DestroyIcon(m_hIcon);
}
Additional query words: 4.00
Keywords: kbbitmap kbbutton kbcode kbicon kbprb kbuidesign KB142226