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. Keyboard messages not received by my window

Keyboard messages not received by my window

Scheduled Pinned Locked Moved C / C++ / MFC
c++javahelpquestion
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
    theCPkid
    wrote on last edited by
    #1

    Try to understand this. I have a main application and a dll. main application has its mfc view window, say window 1 and there's a button on main window(window 1) which calls a function inside a dll to open a new window, say window 2. Both view windows handles WM_KEYDOWN message and pop up a message box. Now, when only window 1 is opened, all keyboard messages are properly received by it. When I open a window 2 and then press key, no keyboard message is received by either of the windows. Even if I minimize window 1 by clicking on minimize button at top right, no keyboard message is received by either of the windows. Imagine this -> both windows are open side by side and if I directly click on window 2, then it will bring window 2 to forefront and now window 2 will receive all keyboard messages. I know window 2 is child of window 1 but somehow not able to route messages to window 2 properly. Does anyone have any idea why this problem in setting focus to window 2 is occuring. when I minimize window 1, why cant window 2 receive keyboard messages???

    the fruits of your success will be in direct ratio to the honesty and sincerity of your own efforts in keeping your own records, doing your own thinking and, reaching your own conclusions. ..surviving in autumn..in love with spring..

    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