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. control in View

control in View

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

    in my MDI project. there is a "CGridCtrl m_Grid" variable in MyView. I want MyView to intercept Windows Message to m_Grid. Can I do that? I was thinking SubclassDlgItem may work, but I realy can't to figure it out. Any help is appreciate. :^)

    S 1 Reply Last reply
    0
    • L LeeeNN

      in my MDI project. there is a "CGridCtrl m_Grid" variable in MyView. I want MyView to intercept Windows Message to m_Grid. Can I do that? I was thinking SubclassDlgItem may work, but I realy can't to figure it out. Any help is appreciate. :^)

      S Offline
      S Offline
      Stephen Hewitt
      wrote on last edited by
      #2

      If you just want posted and input messages you could overide PreTranslateMessage in your view class. If you want all messages, not just those dispatched by the message loop, it will be harder. One option would be to subclass the control and have the new WindowProc delegate the work to your view class. Steve

      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