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