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. Key Press Event

Key Press Event

Scheduled Pinned Locked Moved C / C++ / MFC
com
2 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.
  • R Offline
    R Offline
    rjkg
    wrote on last edited by
    #1

    I have a GUI Activex Application . Now I want to get the key press event when focus is on any one of the window control ,i.e.text box , button , listcontrol slider control etc.

    Rajesh

    J 1 Reply Last reply
    0
    • R rjkg

      I have a GUI Activex Application . Now I want to get the key press event when focus is on any one of the window control ,i.e.text box , button , listcontrol slider control etc.

      Rajesh

      J Offline
      J Offline
      Joan M
      wrote on last edited by
      #2

      There are lots of ways to solve this... You could create events for all your controls. -- In the resource editor right click each control and select add "event handler". -- then in your code the event handler will appear and you'll be able to control what you want to do with it. If you need to do that for a lot of controls and the behavior should be the same extend a control class and pre-program it. You could also capture the WM_KEYDOWN message. -- Open the class assistant (CTRL+shift+X). -- messages tab. -- add the WM_KEYDOWN handler. You are done. Hope this helps.

      [www.tamelectromecanica.com] Robots, CNC and PLC machines for grinding and polishing.

      https://www.robotecnik.com freelance robots, PLC and CNC programmer.

      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