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. How to use " CMFCPropertyGridProperty "to have a button

How to use " CMFCPropertyGridProperty "to have a button

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorial
2 Posts 2 Posters 23 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.
  • S Offline
    S Offline
    stevenyes
    wrote on last edited by
    #1

    I want to use class CMFCPropertyGridProperty to add a button,and when i click the button,it can pop a dialog which i defined it by myself. it trobuled me a long time. when i see the information online,it told me that i can use CMFCPropertyGridProperty::hasbutton method,but it's a protect member,and i am new do this,i really don't know how to do it. help me... thanks a lot

    A 1 Reply Last reply
    0
    • S stevenyes

      I want to use class CMFCPropertyGridProperty to add a button,and when i click the button,it can pop a dialog which i defined it by myself. it trobuled me a long time. when i see the information online,it told me that i can use CMFCPropertyGridProperty::hasbutton method,but it's a protect member,and i am new do this,i really don't know how to do it. help me... thanks a lot

      A Offline
      A Offline
      Andrew Truckle
      wrote on last edited by
      #2

      As a minimum you create a new class that inherits from the base class. Then you can override the HasButton method and get it to return true. Now you will get a small … button when you use this new class for your property. If you look at the MFC source code you will see that you can also override OnButtonClick to detect when the button is clicked. This is as much as I have found out so far.

      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