简体   繁体   中英

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 . 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. Presumably it has numeric value that causes the behaviour. One imagines that your bogus style is being interpreted as ES_LOWERCASE .

Remove EM_SETHANDLE from your window style.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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