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. Tying several objects to one class function?

Tying several objects to one class function?

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

    I know it's not supported with the Classwizard, but is there a way to tie a class function to several objects, and have a pointer to the "clicked" object passed to the function? I have ten rows (exact copies) on a dialog form, and i'd like to have one univeral function for each column, instead of ten seperate functions for each object. If a pointer to this object was passed, I could easily do everything I need within this one function. I've had this ability in other GUI packages. Maybe I'm just spoiled and this can't be done here. I'm just trying to streamline my code. Any help is appreciated. Todd Krzeminski tkrzeminski@nlxcorp.com

    T 1 Reply Last reply
    0
    • T tjkrz

      I know it's not supported with the Classwizard, but is there a way to tie a class function to several objects, and have a pointer to the "clicked" object passed to the function? I have ten rows (exact copies) on a dialog form, and i'd like to have one univeral function for each column, instead of ten seperate functions for each object. If a pointer to this object was passed, I could easily do everything I need within this one function. I've had this ability in other GUI packages. Maybe I'm just spoiled and this can't be done here. I'm just trying to streamline my code. Any help is appreciated. Todd Krzeminski tkrzeminski@nlxcorp.com

      T Offline
      T Offline
      Tomasz Sowinski
      wrote on last edited by
      #2

      Try ON_CONTROL_RANGE. Tomasz Sowinski -- http://www.shooltz.com

      - It's for protection
      - Protection from what? Zee Germans?

      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