允许CEdit
要显示 Unicode 字符,您应该使用以下命令创建它CreateWindowW
功能。我刚刚在 ANSI MFC 程序中测试了它。
// allows Unicode characters
CreateWindowW( L"EDIT", L"", WS_CHILD|WS_VISIBLE, 10, 10, 50, 20, GetSafeHwnd(), 0, 0, 0 );
// shows Unicode characters as ?
CreateWindow( "EDIT", "", WS_CHILD|WS_VISIBLE, 10, 10, 50, 20, GetSafeHwnd(), 0, 0, 0 );
您可以手动创建所有编辑框OnInitDialog
对话框的功能。然后将它们子类化为具有 Unicode 支持的自定义 CMyEdit 类。