|
|
|
@ -125,18 +125,18 @@ HGLOBAL StaticDialog::makeRTLResource(int dialogID, DLGTEMPLATE **ppMyDlgTemplat
|
|
|
|
|
if (!hDlgTemplate)
|
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
|
|
DLGTEMPLATE *pDlgTemplate = (DLGTEMPLATE *)::LockResource(hDlgTemplate);
|
|
|
|
|
DLGTEMPLATE *pDlgTemplate = reinterpret_cast<DLGTEMPLATE *>(::LockResource(hDlgTemplate));
|
|
|
|
|
if (!pDlgTemplate)
|
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
|
|
// Duplicate Dlg Template resource
|
|
|
|
|
unsigned long sizeDlg = ::SizeofResource(_hInst, hDialogRC);
|
|
|
|
|
HGLOBAL hMyDlgTemplate = ::GlobalAlloc(GPTR, sizeDlg);
|
|
|
|
|
*ppMyDlgTemplate = (DLGTEMPLATE *)::GlobalLock(hMyDlgTemplate);
|
|
|
|
|
*ppMyDlgTemplate = reinterpret_cast<DLGTEMPLATE *>(::GlobalLock(hMyDlgTemplate));
|
|
|
|
|
|
|
|
|
|
::memcpy(*ppMyDlgTemplate, pDlgTemplate, sizeDlg);
|
|
|
|
|
|
|
|
|
|
DLGTEMPLATEEX *pMyDlgTemplateEx = (DLGTEMPLATEEX *)*ppMyDlgTemplate;
|
|
|
|
|
DLGTEMPLATEEX *pMyDlgTemplateEx = reinterpret_cast<DLGTEMPLATEEX *>(*ppMyDlgTemplate);
|
|
|
|
|
if (pMyDlgTemplateEx->signature == 0xFFFF)
|
|
|
|
|
pMyDlgTemplateEx->exStyle |= WS_EX_LAYOUTRTL;
|
|
|
|
|
else
|
|
|
|
|