Skip to content

Commit 0c61b6b

Browse files
committed
fix MCtrlPropDlg
1 parent e3c8ea7 commit 0c61b6b

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/MCtrlPropDlg.hpp

+11-1
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ class MCtrlPropDlg : public MDialogBase
117117
mstr_trim(strCaption);
118118
if (!strCaption.empty())
119119
flags |= F_TITLE;
120+
if (strCaption[0] == TEXT('"'))
121+
mstr_unquote(strCaption);
120122
item.m_Title = strCaption.c_str();
121123

122124
MString strX = GetDlgItemText(edt1);
@@ -400,7 +402,15 @@ class MCtrlPropDlg : public MDialogBase
400402
}
401403
if (m_flags & F_TITLE)
402404
{
403-
SetDlgItemText(hwnd, cmb2, m_item.m_Title.c_str_or_empty());
405+
MString strCaption;
406+
if (!m_item.m_Title.empty())
407+
{
408+
if (m_item.m_Title.is_int())
409+
strCaption = m_item.m_Title.c_str();
410+
else
411+
strCaption = m_item.m_Title.quoted_wstr();
412+
}
413+
SetDlgItemText(hwnd, cmb2, strCaption.c_str());
404414
}
405415

406416
CenterWindowDx();

0 commit comments

Comments
 (0)