コード例 #1
0
BOOL CDlg_CheckFileIntegrity_Result::OnInitDialog()
{
	CDialog::OnInitDialog();

	HICON hIco = m_bResultOK ? SICOEX (IDI_TEST_OK, 32, 32) : LoadIcon (NULL, IDI_ERROR);
	m_wndIcon.SetIcon (hIco);

	if (m_bResultOK == false)
		GetDlgItem (IDC_NEVERSHOWTHISIFTESTOK)->EnableWindow (FALSE);
	else
		GetDlgItem (IDC_RESTARTDOWNLOAD)->ShowWindow (SW_HIDE);

	CString str = "URL: "; str += m_strUrl; str += "\r\n";
	str += LS (L_FILENAME); str += ": "; str += m_strFileName; str += "\r\n";
	
	if (m_bResultOK == false)
	{
		str += LS (L_VALIDCHECKSUM); str += ": "; str += m_strValidHash; str += "\r\n";
		str += LS (L_RESULTCHECKSUM); str += ": "; str += m_strResultHash;
	}
	SetDlgItemText (IDC_FILEINFO, str);
		
	ApplyLanguage ();
	
	return TRUE; 
	             
}
コード例 #2
0
void fsTrayIconMgr::LoadIcons(UINT *pIcons, UINT cIcons)
{
	if (m_pIcons)
		delete [] m_pIcons;

	fsnew (m_pIcons, HICON, cIcons);
	m_cIcons = cIcons;

	for (UINT i = 0; i < cIcons; i++)
		m_pIcons [i] = SICOEX (pIcons [i], 16, 16);
}