Fixed some string replacements and that FileErrorText bug.

ChangeUI now supports changing dialogs other than IDD_INST.


git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@655 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2002-08-06 11:24:49 +00:00
parent 1b63e29528
commit ef05d934d9
9 changed files with 174 additions and 65 deletions

View file

@ -11,7 +11,6 @@ int g_dopause=0;
extern int g_display_errors;
extern FILE *g_output;
void dopause(void)
{
if (g_dopause)
@ -290,3 +289,24 @@ int generate_unicons_offsets(unsigned char* exeHeader, unsigned char* uninstIcon
return PIMAGE_RESOURCE_DATA_ENTRY(PRESOURCE_DIRECTORY(rdIcons->Entries[0].OffsetToDirectory + DWORD(rdRoot))->Entries[0].OffsetToData + DWORD(rdRoot))->OffsetToData + DWORD(rdRoot) - dwResourceSectionVA - DWORD(exeHeader);
}
#endif // NSIS_CONFIG_UNINSTALL_SUPPORT
#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
BYTE* get_dlg(HINSTANCE hUIFile, WORD dlgId, char* filename) {
HRSRC hUIRes = FindResource(hUIFile, MAKEINTRESOURCE(dlgId), RT_DIALOG);
if (!hUIRes) {
if (g_display_errors) fprintf(g_output, "Error: \"%s\" doesn't contain a dialog with the ID %u!\n", filename, dlgId);
return 0;
}
HGLOBAL hUIMem = LoadResource(hUIFile, hUIRes);
if (!hUIMem) {
if (g_display_errors) fprintf(g_output, "Error: Can't load a dialog from \"%s\"!\n", filename);
return 0;
}
BYTE* pbUIData = (BYTE*)LockResource(hUIMem);
if (!pbUIData) {
if (g_display_errors) fprintf(g_output, "Error: Can't lock resource from \"%s\"!\n", filename);
return 0;
}
return pbUIData;
}
#endif //NSIS_CONFIG_VISIBLE_SUPPORT