BOOL ShowAvailableAppInfo(INT Index) { PAPPLICATION_INFO Info = (PAPPLICATION_INFO) ListViewGetlParam(Index); WCHAR szText[MAX_STR_LEN]; if (!Info) return FALSE; NewRichEditText(Info->szName, CFE_BOLD); InsertRichEditText(L"\n", 0); #define ADD_TEXT(a, b, c, d) \ if (b[0] != '\0') \ { \ LoadStringW(hInst, a, szText, sizeof(szText) / sizeof(WCHAR)); \ InsertRichEditText(szText, c); \ InsertRichEditText(b, d); \ } \ ADD_TEXT(IDS_AINFO_VERSION, Info->szVersion, CFE_BOLD, 0); ADD_TEXT(IDS_AINFO_LICENCE, Info->szLicence, CFE_BOLD, 0); ADD_TEXT(IDS_AINFO_SIZE, Info->szSize, CFE_BOLD, 0); ADD_TEXT(IDS_AINFO_URLSITE, Info->szUrlSite, CFE_BOLD, CFE_LINK); ADD_TEXT(IDS_AINFO_DESCRIPTION, Info->szDesc, CFE_BOLD, 0); return TRUE; }
VOID SetWelcomeText(VOID) { WCHAR szText[MAX_STR_LEN*3]; LoadStringW(hInst, IDS_WELCOME_TITLE, szText, sizeof(szText) / sizeof(WCHAR)); NewRichEditText(szText, CFE_BOLD); LoadStringW(hInst, IDS_WELCOME_TEXT, szText, sizeof(szText) / sizeof(WCHAR)); InsertRichEditText(szText, 0); LoadStringW(hInst, IDS_WELCOME_URL, szText, sizeof(szText) / sizeof(WCHAR)); InsertRichEditText(szText, CFM_LINK); }
BOOL ShowAvailableAppInfo(INT Index) { PAPPLICATION_INFO Info = (PAPPLICATION_INFO) ListViewGetlParam(Index); WCHAR szText[MAX_STR_LEN]; if (!Info) return FALSE; NewRichEditText(Info->szName, CFE_BOLD); InsertRichEditText(L"\n", 0); ADD_TEXT(IDS_AINFO_VERSION, Info->szVersion, CFE_BOLD, 0); ADD_TEXT(IDS_AINFO_LICENSE, Info->szLicense, CFE_BOLD, 0); ADD_TEXT(IDS_AINFO_SIZE, Info->szSize, CFE_BOLD, 0); ADD_TEXT(IDS_AINFO_URLSITE, Info->szUrlSite, CFE_BOLD, CFE_LINK); ADD_TEXT(IDS_AINFO_DESCRIPTION, Info->szDesc, CFE_BOLD, 0); return TRUE; }
BOOL ShowInstalledAppInfo(INT Index) { WCHAR szText[MAX_PATH], szInfo[MAX_PATH]; PINSTALLED_INFO Info = (PINSTALLED_INFO) ListViewGetlParam(Index); if (!Info || !Info->hSubKey) return FALSE; GetApplicationString(Info->hSubKey, L"DisplayName", szText); NewRichEditText(szText, CFE_BOLD); InsertRichEditText(L"\n", 0); #define GET_INFO(a, b, c, d) \ if (GetApplicationString(Info->hSubKey, a, szInfo)) \ { \ LoadStringW(hInst, b, szText, sizeof(szText) / sizeof(WCHAR)); \ InsertRichEditText(szText, c); \ InsertRichEditText(szInfo, d); \ } \ GET_INFO(L"DisplayVersion", IDS_INFO_VERSION, CFE_BOLD, 0); GET_INFO(L"Publisher", IDS_INFO_PUBLISHER, CFE_BOLD, 0); GET_INFO(L"RegOwner", IDS_INFO_REGOWNER, CFE_BOLD, 0); GET_INFO(L"ProductID", IDS_INFO_PRODUCTID, CFE_BOLD, 0); GET_INFO(L"HelpLink", IDS_INFO_HELPLINK, CFE_BOLD, CFM_LINK); GET_INFO(L"HelpTelephone", IDS_INFO_HELPPHONE, CFE_BOLD, 0); GET_INFO(L"Readme", IDS_INFO_README, CFE_BOLD, 0); GET_INFO(L"Contact", IDS_INFO_CONTACT, CFE_BOLD, 0); GET_INFO(L"URLUpdateInfo", IDS_INFO_UPDATEINFO, CFE_BOLD, CFM_LINK); GET_INFO(L"URLInfoAbout", IDS_INFO_INFOABOUT, CFE_BOLD, CFM_LINK); GET_INFO(L"Comments", IDS_INFO_COMMENTS, CFE_BOLD, 0); GET_INFO(L"InstallDate", IDS_INFO_INSTALLDATE, CFE_BOLD, 0); GET_INFO(L"InstallLocation", IDS_INFO_INSTLOCATION, CFE_BOLD, 0); GET_INFO(L"InstallSource", IDS_INFO_INSTALLSRC, CFE_BOLD, 0); GET_INFO(L"UninstallString", IDS_INFO_UNINSTALLSTR, CFE_BOLD, 0); GET_INFO(L"InstallSource", IDS_INFO_INSTALLSRC, CFE_BOLD, 0); GET_INFO(L"ModifyPath", IDS_INFO_MODIFYPATH, CFE_BOLD, 0); return TRUE; }