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. Keydown from CView to CFrameWnd

Keydown from CView to CFrameWnd

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

    I was wondering how I get a key pressed that isn't handled by my CView derived class to be passed down to the CFrameWnd container that it is sitting in. I have a OnkeyDown in my CView class and one in my CFrameWnd class. When I fire a keydown event by typing on the keyboard, I only get the message as far as my CView class. What do I need to do so it propagates down to the CFrameWnd class? Cheers, Clint

    J 1 Reply Last reply
    0
    • C clintsinger

      I was wondering how I get a key pressed that isn't handled by my CView derived class to be passed down to the CFrameWnd container that it is sitting in. I have a OnkeyDown in my CView class and one in my CFrameWnd class. When I fire a keydown event by typing on the keyboard, I only get the message as far as my CView class. What do I need to do so it propagates down to the CFrameWnd class? Cheers, Clint

      J Offline
      J Offline
      John M Drescher
      wrote on last edited by
      #2

      Put this in your CView::OnKeyDown() GetParent()->PostMessage(WM_KEYDOWN,nChar,MAKELONG(nRepCnt,nFlags)); John

      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