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. OnNotify and the MFCGrid

OnNotify and the MFCGrid

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

    Hello, I'm using the MFCGrid and I want my code to respond to the user editing a cell. It's a dialog based application. Looking at the demo app, it's looks like I should create the following mapping: ON_NOTIFY(GVN_ENDLABELEDIT, IDC_GRID, OnGridEndEdit) However, I am creating the Grid control dynamically in the code using m_pGridCtrl->Create(rect, this, 100); instead of binding it to a Custom Control on the dialog, therefore I don't have the equivelent of IDC_GRID. Is there another way to bind the WM_NOTIFY message to a instantiated variable of the control. Thanks, John

    H 1 Reply Last reply
    0
    • J John Oliver

      Hello, I'm using the MFCGrid and I want my code to respond to the user editing a cell. It's a dialog based application. Looking at the demo app, it's looks like I should create the following mapping: ON_NOTIFY(GVN_ENDLABELEDIT, IDC_GRID, OnGridEndEdit) However, I am creating the Grid control dynamically in the code using m_pGridCtrl->Create(rect, this, 100); instead of binding it to a Custom Control on the dialog, therefore I don't have the equivelent of IDC_GRID. Is there another way to bind the WM_NOTIFY message to a instantiated variable of the control. Thanks, John

      H Offline
      H Offline
      HPSI
      wrote on last edited by
      #2

      In effect the Create() has done the binding for you. All you have to do is put

      ON\_NOTIFY(GVN\_ENDLABELEDIT, 100, OnGridEndEdit)
      

      in the message map (maybe using "IDC_GRID" might be better than just "100"). HPS HwndSpy - GUI developer's aid to visually locate and inspect windows. For the month of August only, use coupon code CP-81239 for 30% off.

      J 1 Reply Last reply
      0
      • H HPSI

        In effect the Create() has done the binding for you. All you have to do is put

        ON\_NOTIFY(GVN\_ENDLABELEDIT, 100, OnGridEndEdit)
        

        in the message map (maybe using "IDC_GRID" might be better than just "100"). HPS HwndSpy - GUI developer's aid to visually locate and inspect windows. For the month of August only, use coupon code CP-81239 for 30% off.

        J Offline
        J Offline
        John Oliver
        wrote on last edited by
        #3

        OOPs, I didn't realise that the third parameter was the resource ID, I thought it was some combination of default flags. Thanks very much!

        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