Fix Encoding radio button issue in New Document

Sync UTF-8 checkbox with UTF-8 radio button

Closes #2377
This commit is contained in:
Rajendra Singh 2016-10-02 00:56:21 +05:30 committed by Don Ho
parent 752c1329e3
commit a4b03a1f57

View File

@ -1243,6 +1243,8 @@ INT_PTR CALLBACK DefaultNewDocDlg::run_dlgProc(UINT message, WPARAM wParam, LPAR
case IDC_RADIO_OTHERCP :
{
ndds._openAnsiAsUtf8 = false;
makeOpenAnsiAsUtf8(false);
::EnableWindow(::GetDlgItem(_hSelf, IDC_COMBO_OTHERCP), true);
auto index = ::SendDlgItemMessage(_hSelf, IDC_COMBO_OTHERCP, CB_GETCURSEL, 0, 0);
ndds._codepage = static_cast<int32_t>(::SendDlgItemMessage(_hSelf, IDC_COMBO_OTHERCP, CB_GETITEMDATA, index, 0));