简体   繁体   English

Win32 Edit控件混合大小写

[英]Win32 Edit control mixed case

I'm learning and new to this. 我正在学习并且对此很陌生。 I've searched this for a long time and can't find any answer. 我已经搜索了很长时间,找不到任何答案。

Every time I type text in an Edit control, it always turned to lowercase, even when using Shift or CapsLock . 每次我在Edit控件中键入文本时,即使使用ShiftCapsLock ,它也始终变为小写。 I did not put any lowercase/uppercase style on it: 我没有在上面放任何小写/大写样式:

hEditSub = CreateWindow("EDIT", NULL, WS_CHILD | WS_VISIBLE | WS_BORDER | EM_SETHANDLE, 10, 334, 270, 20, hwnd_MainSub, NULL, hInstance_Main, NULL);

Is there any way to make it mixed case (allowing lower and uppercase)? 有什么办法可以混合大小写(允许小写和大写)? Or is subclassing required? 还是需要子类化?

EM_SETHANDLE is a window message constant and not a window style. EM_SETHANDLE是窗口消息常量,而不是窗口样式。 Presumably it has numeric value that causes the behaviour. 大概它具有导致该行为的数值。 One imagines that your bogus style is being interpreted as ES_LOWERCASE . 有人以为您的虚假样式被解释为ES_LOWERCASE

Remove EM_SETHANDLE from your window style. 从您的窗口样式中删除EM_SETHANDLE

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM