Fix x64 crash on UDL dialg

Fix x64 crash on new language dialog of UDL
pull/2324/head
Don Ho 8 years ago
parent 8777d752af
commit 517d82a29a

@ -1301,7 +1301,7 @@ INT_PTR CALLBACK UserDefineDialog::run_dlgProc(UINT message, WPARAM wParam, LPAR
else
strDlg.init(_hInst, _hSelf, TEXT("Create New Language..."), TEXT("Name : "), TEXT(""), langNameLenMax-1);
TCHAR *tmpName = (TCHAR *)strDlg.doDialog();
TCHAR *tmpName = reinterpret_cast<TCHAR *>(strDlg.doDialog());
if (tmpName && tmpName[0])
{
@ -1530,9 +1530,9 @@ INT_PTR CALLBACK StringDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM)
{
TCHAR tmpName[langNameLenMax];
tmpName[0] = '\0';
::GetDlgItemText(_hSelf, IDC_STRING_EDIT, (LPTSTR)tmpName, langNameLenMax);
::GetDlgItemText(_hSelf, IDC_STRING_EDIT, tmpName, langNameLenMax);
_textValue = tmpName;
::EndDialog(_hSelf, int(_textValue.c_str()));
::EndDialog(_hSelf, reinterpret_cast<INT_PTR>(_textValue.c_str()));
return TRUE;
}

@ -412,8 +412,8 @@ public :
_txtLen = txtLen;
};
long doDialog() {
return long(::DialogBoxParam(_hInst, MAKEINTRESOURCE(IDD_STRING_DLG), _hParent, dlgProc, reinterpret_cast<LPARAM>(this)));
INT_PTR doDialog() {
return ::DialogBoxParam(_hInst, MAKEINTRESOURCE(IDD_STRING_DLG), _hParent, dlgProc, reinterpret_cast<LPARAM>(this));
};
virtual void destroy() {};

Loading…
Cancel
Save