Windows 弄乱了 TextBox 控件中放入的数据

发布于 2025-01-09 10:04:13 字数 709 浏览 4 评论 0原文

这对我来说是难以置信的,我不知道如何解决这个问题! 我尝试将 [4]0.004 放入 EditBox 控件中,EditBox 中显示的是 0.004[4]。使用括号和大括号可以获得相同的结果。然后使用 -4-0.004 我得到 4-0.004-。下面是重现问题的简化代码:

void CMyDlg::DoDataExchange(CDataExchange* pDX)
{
    CString test = _T("[4]0.004");
    DDX_Text(pDX, IDC_TX_CELL_MAX_V, test);
}

EditBox 控件在 .rc 文件中定义为:

    EDITTEXT        IDC_TX_CELL_MAX_V,100,121,58,15,ES_CENTER | ES_READONLY | NOT WS_BORDER,WS_EX_RTLREADING | WS_EX_STATICEDGE

这是屏幕上的图像:

在此处输入图像描述

如何解决此问题?

This is unbelievable to me, and I do not know how to work around this problem!
I try to put [4]0.004 into an EditBox Control and what appears in the EditBox is 0.004[4]. Same result is obtained with parenthesis and braces. Then with -4-0.004 I get 4-0.004-. Here is simplified code that reproducers the problem:

void CMyDlg::DoDataExchange(CDataExchange* pDX)
{
    CString test = _T("[4]0.004");
    DDX_Text(pDX, IDC_TX_CELL_MAX_V, test);
}

The EditBox control is defined in the .rc file as:

    EDITTEXT        IDC_TX_CELL_MAX_V,100,121,58,15,ES_CENTER | ES_READONLY | NOT WS_BORDER,WS_EX_RTLREADING | WS_EX_STATICEDGE

And Here is the image on the screen:

enter image description here

How do I work around this problem?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文