I have an edit text control which i want to subclass to allow lowercase characters when the SHIFT key is pressed because the control is allowed to accept only uppercase characters by default.
So my problem is how to change the typing mode in the control from lower to uppercase.
I'm using WIN32, i succeeded to catch the WM_CHAR event :
WNDPROC ancienneEditProc;
LRESULT CALLBACK EditTextProc(HWND hwnd, UINT mssg, WPARAM wParam, LPARAM lParam)
{
switch(mssg)
{
case WM_CHAR:
{
char character[2];
character[0] = (char)wParam;
character[1] = 0;
if(HIWORD(GetKeyState(VK_SHIFT)))
{
AnsiLower(character);
}
wParam = character[0];
}
break;
}
return CallWindowProc(ancienneEditProc, hwnd, mssg, wParam, lParam);
}
But the problem is how i can update the edit text control to accept lowercase after catching the WM_CHAR.