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. SendKey

SendKey

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestion
3 Posts 2 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.
  • B Offline
    B Offline
    BaldwinMartin
    wrote on last edited by
    #1

    Hi Anyone have a example of SendKey. Peter and I are working on my project and I need some help. I want to sendkey to a window I have a handle for. Thanks to Peter I have enumed all the top level windows, now I need help with SendKey. Will this project ever end? Best Wishes, ez_way

    A 1 Reply Last reply
    0
    • B BaldwinMartin

      Hi Anyone have a example of SendKey. Peter and I are working on my project and I need some help. I want to sendkey to a window I have a handle for. Thanks to Peter I have enumed all the top level windows, now I need help with SendKey. Will this project ever end? Best Wishes, ez_way

      A Offline
      A Offline
      Abin
      wrote on last edited by
      #2

      It depends on what kind of keys you want to send... This is just a sample: // suppose your window handle is hwnd, you want to send key "A" to it. ::PostMessage(hwnd, WM_CHAR, WPARAM('A'), LPARAM(0));

      B 1 Reply Last reply
      0
      • A Abin

        It depends on what kind of keys you want to send... This is just a sample: // suppose your window handle is hwnd, you want to send key "A" to it. ::PostMessage(hwnd, WM_CHAR, WPARAM('A'), LPARAM(0));

        B Offline
        B Offline
        BaldwinMartin
        wrote on last edited by
        #3

        Thank you, very helpful! I am sending ::PostMessage(hwnd, WM_CHAR, WPARAM('^'), LPARAM(M)); Ctrl+M Best Wishes very good~! Best Wishes, ez_way

        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