Iabt Floating Keyboard
-
Hi all , I have an SDI application in which i have created a dialog box and attached that to frame and on the dialog box I kept few buttons which r owner drawn and all the buttons are members of dialog class and are made as objects of button class,now when ever i click the button on the dialog box keyboard messages should be generated and that character should be sent to the edit view by using the following code they r displaying but giving problem when i keep cursor on them and try to type with keyboard keys void MyDialog::OnButton65() { CTrailView *pView = (CTrailView *)((CMainFrame*)GetParent())->GetActiveView(); BYTE keyState[256]={0}; GetKeyboardState((LPBYTE)&keyState); short shift=0; shift =GetKeyState(16); short caps=GetKeyState(20); if(caps)//shift) { pView->SendMessage(WM_KEYDOWN, 65, 1);///for 'A' pView->SendMessage(WM_CHAR,65,1); pView->SendMessage(WM_KEYUP, 65, 1); } if(!caps) //!Shift) { pView->SendMessage(WM_KEYDOWN, 97, 1);///for 'a' pView->SendMessage(WM_CHAR,97,1); pView->SendMessage(WM_KEYUP, 97, 1); } } the reason is my 2nd and 3rd parameters of SendMessage are not correct can any one tell me how can I send proper wparam and lparam values there so that I can proper out put and which API's gives me those values Request to all to continue this