Click to See Complete Forum and Search --> : Using PostKeybdMessage for lowercase......


Prabu Kumar
07-06-2007, 10:52 AM
Hi All,

I need to send keyboard events in my application.I have used keybd_event() for control keys and PostKeybdMessage() for uppercase letters.It is all working fine.But the issue is i am not able to get the lowercase letters.
i have used following code.
/************************************************** ****************/
keybd_event(VK_SHIFT,0,0,0);
charBuf[0] = (UINT)byte;
pShiftStateBuffer[0] = (KeyStateDownFlag | KeyShiftCapitalFlag);
if(!PostKeybdMessage((HWND)-1,0,pShiftStateBuffer[0],1,pShiftStateBuffer,&charBuf[0]))
{

}
charBuf[0] = 0;
pShiftStateBuffer[0] = KeyShiftDeadFlag;
if(!PostKeybdMessage((HWND)-1,0,pShiftStateBuffer[0],1,pShiftStateBuffer,&charBuf[0]))
{

}

keybd_event(VK_SHIFT,0,KEYEVENTF_KEYUP,0);
/************************************************** *************************/
Thanks in advance......

Prabu Kumar.K