ChangeUI must force RichEdit20A/W class based on target
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6411 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
5744372364
commit
ed8d91a1c1
2 changed files with 6 additions and 3 deletions
|
@ -605,8 +605,11 @@ BYTE* CDialogTemplate::Save(DWORD& dwSize) {
|
|||
// Write class variant length array
|
||||
const WCHAR *szClass = m_vItems[i]->szClass;
|
||||
#ifdef _UNICODE
|
||||
if (!IS_INTRESOURCE(szClass) && m_build_unicode && !_wcsicmp(szClass, L"RichEdit20A"))
|
||||
szClass = L"RichEdit20W"; // transmute ANSI RichEdit control into Unicode RichEdit
|
||||
if (!IS_INTRESOURCE(szClass)) {
|
||||
// transmute RichEdit20A/W control into RichEdit20T that matches the target
|
||||
if (m_build_unicode && !_wcsicmp(szClass, L"RichEdit20A")) szClass = L"RichEdit20W";
|
||||
if (!m_build_unicode && !_wcsicmp(szClass, L"RichEdit20W")) szClass = L"RichEdit20A";
|
||||
}
|
||||
#endif
|
||||
WriteStringOrId(szClass);
|
||||
// Write title variant length array
|
||||
|
|
|
@ -2647,7 +2647,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
|
|||
// Search for required items
|
||||
#define GET(x) dlg = uire->GetResource(RT_DIALOG, x, 0); if (!dlg) return PS_ERROR; CDialogTemplate UIDlg(dlg, build_unicode, uDefCodePage);
|
||||
#define SEARCH(x) if (!UIDlg.GetItem(x)) {ERROR_MSG(_T("Error: Can't find %s (%u) in the custom UI!\n"), _T(#x), x);delete [] dlg;delete uire;return PS_ERROR;}
|
||||
#define SAVE(x) dwSize = UIDlg.GetSize(); res_editor->UpdateResource(RT_DIALOG, x, NSIS_DEFAULT_LANG, dlg, dwSize); delete [] dlg;
|
||||
#define SAVE(x) delete [] dlg; dlg = UIDlg.Save(dwSize); res_editor->UpdateResource(RT_DIALOG, x, NSIS_DEFAULT_LANG, dlg, dwSize); delete [] dlg;
|
||||
|
||||
LPBYTE dlg = NULL;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue