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. Subclassing windows controls

Subclassing windows controls

Scheduled Pinned Locked Moved C / C++ / MFC
data-structuresquestion
3 Posts 3 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.
  • F Offline
    F Offline
    flavour404
    wrote on last edited by
    #1

    Hi, I have subclassed a window I am working on, and want to access the controls on that window so that I can access the messages that are being passed to and from them, how do you do this? I can get everything that happens on the window, mousemove, window moving, paint etc but I want to work with the controls...? Any ideas or pointers would be great. :) Do I have to subclass them as well, surely they are in some kind of array/linked list structure that I should be able to iterate over? Many thanks, Ron

    J W 2 Replies Last reply
    0
    • F flavour404

      Hi, I have subclassed a window I am working on, and want to access the controls on that window so that I can access the messages that are being passed to and from them, how do you do this? I can get everything that happens on the window, mousemove, window moving, paint etc but I want to work with the controls...? Any ideas or pointers would be great. :) Do I have to subclass them as well, surely they are in some kind of array/linked list structure that I should be able to iterate over? Many thanks, Ron

      J Offline
      J Offline
      Jun Du
      wrote on last edited by
      #2

      It depends how much control you want over these controls. I think you got three options: 1) If you just want to get/set text or like, you can get their Windows object and make limited calls. 2) If you want to call all their methods for each control, you can declare a control variable for it. 3) If you want to modify/enhance/add behavious, you need to subclass them.

      Best, Jun

      1 Reply Last reply
      0
      • F flavour404

        Hi, I have subclassed a window I am working on, and want to access the controls on that window so that I can access the messages that are being passed to and from them, how do you do this? I can get everything that happens on the window, mousemove, window moving, paint etc but I want to work with the controls...? Any ideas or pointers would be great. :) Do I have to subclass them as well, surely they are in some kind of array/linked list structure that I should be able to iterate over? Many thanks, Ron

        W Offline
        W Offline
        William Wang
        wrote on last edited by
        #3

        if u want to handle the messages passed to the controls, I think u will have to subclass them, I couldn't figure out there r some ways else could work out. :-), for the messages passed from controls, u need subclass the controls parent window which u have already done.

        life is like a box of chocolate,you never know what you r going to get.

        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