Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Iabt Floating Keyboard

Iabt Floating Keyboard

Scheduled Pinned Locked Moved C / C++ / MFC
jsonhelpquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Tripura K
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups