Fix x64 crash on UDL dialg
Fix x64 crash on new language dialog of UDL
This commit is contained in:
parent
8777d752af
commit
517d82a29a
|
@ -1301,7 +1301,7 @@ INT_PTR CALLBACK UserDefineDialog::run_dlgProc(UINT message, WPARAM wParam, LPAR
|
||||||
else
|
else
|
||||||
strDlg.init(_hInst, _hSelf, TEXT("Create New Language..."), TEXT("Name : "), TEXT(""), langNameLenMax-1);
|
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])
|
if (tmpName && tmpName[0])
|
||||||
{
|
{
|
||||||
|
@ -1530,9 +1530,9 @@ INT_PTR CALLBACK StringDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM)
|
||||||
{
|
{
|
||||||
TCHAR tmpName[langNameLenMax];
|
TCHAR tmpName[langNameLenMax];
|
||||||
tmpName[0] = '\0';
|
tmpName[0] = '\0';
|
||||||
::GetDlgItemText(_hSelf, IDC_STRING_EDIT, (LPTSTR)tmpName, langNameLenMax);
|
::GetDlgItemText(_hSelf, IDC_STRING_EDIT, tmpName, langNameLenMax);
|
||||||
_textValue = tmpName;
|
_textValue = tmpName;
|
||||||
::EndDialog(_hSelf, int(_textValue.c_str()));
|
::EndDialog(_hSelf, reinterpret_cast<INT_PTR>(_textValue.c_str()));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -412,8 +412,8 @@ public :
|
||||||
_txtLen = txtLen;
|
_txtLen = txtLen;
|
||||||
};
|
};
|
||||||
|
|
||||||
long doDialog() {
|
INT_PTR doDialog() {
|
||||||
return long(::DialogBoxParam(_hInst, MAKEINTRESOURCE(IDD_STRING_DLG), _hParent, dlgProc, reinterpret_cast<LPARAM>(this)));
|
return ::DialogBoxParam(_hInst, MAKEINTRESOURCE(IDD_STRING_DLG), _hParent, dlgProc, reinterpret_cast<LPARAM>(this));
|
||||||
};
|
};
|
||||||
|
|
||||||
virtual void destroy() {};
|
virtual void destroy() {};
|
||||||
|
|
Loading…
Reference in New Issue