Topic profile page for Subclassing.
This page has aggregated data from forum posts, threads, listings, online discussions, newsgroups, messageboards, and other online sources which contain user generated content for the term: Subclassing.
Topic "Subclassing" was discussed 0 times on 0 sites in last 3 months
Started 2 weeks ago (2009-12-15 07:14:00)
by Farmor
Hello all, I have a design decision to make. I have two different Elements with everything the same except the name. So I have two ideas on how this can be solved. 1. Through subclassing. 2. Through enumeration. I have tried to make two examples of this so you can recommend 1 or 2 only on a conceptual level not implementation. Sub classing public class Element { //...
Started 2 months, 2 weeks ago (2009-10-14 15:33:00)
by lesliedellow
The SetWindowLong function has been replaced with the SetWindowLongPtr function, presumably because the latter retuurns 64 bit pointers. However, the corresponding CallWindowProc function still expects its first parameter to be of a WNDPROC type (rather than LONG_PTR). Will this cause problems with subclassing in 64 bit systems?
Started 2 months, 2 weeks ago (2009-10-12 08:07:00)
by tjacobs01
This snippet below from tjacobs.ui.menus.FileMenu (tus.svn.sourceforge.net) shows what I mean. FileMenu declares the method doNew with no functionality, then using reflection checks if it has been overridden. If it has it adds the "New" menu item. So by "Soft Subclassing", I mean if you implement it, I will show it. If you don't, it will be ignored. I think this is a pretty powerful ...
Started 2 months, 3 weeks ago (2009-10-07 16:14:00)
by Jaafar Tribak
A second attempt at safely subclassing in VBA . I apologise if i shouldn't post a link to this thread on this "Excel Questions" forum As the thread was moved to the "General Discussions..." forum yesteday. I am linking the thread here so it has a better chance to be seen as i would really like some feedback on how/if the ...
Started 2 months, 3 weeks ago (2009-10-06 15:12:00)
by Jaafar Tribak
Hi all. This has been intriguing me for years and i've looked and asked everywhere but nobody seems to know the answer. On most operating systems, subclassing office applications from within VBA crashes the application and worse yet, it can downright lock the whole system. this is a known issue and the best advice offered by the experts is either to run the subclassing code from an ...
Started 5 days, 1 hour ago (2009-12-24 14:45:00)
by alisaleh1
I'm implementing a customized CAknGrid I implemented the needed function and I'm sub-classing CFormattedCellListBoxItemDrawer to override DrawActualItem and it work correctly I want to know the layout of the text and the icons that I set using Code: AknListBoxLayouts::SetupFormTextCell and AknListBoxLayouts::SetupFormGfxCell to set the icons to the layout that the user ...
Started 23 hours, 52 minutes ago (2009-12-28 16:32:00)
by Tom Schreiner
Thanks Jaafar. I am looking forward to trying this out. I am for the most part, a hobbyist when it comes to programming so I only choose work that I enjoy. My main job is actually driving a truck. I love playing around with Excel. It's a fantastic application IMO. The performance gain of placing your code into a component might be worth looking into. Timers are not such a bad thing ...
Started 5 days, 4 hours ago (2009-12-24 11:56:00)
by LaVolpe
Paul Caton's thunks have gone thru some upgrades over the past couple years. The version you have may be an older one that had known problems when multiple user controls tried to subclass the same parent form/container. That may or may not apply to your situation. The crashing should not continue after you fix the problems in your project. I'd recommend compiling the project to an exe then ...
Started 1 day, 23 hours ago (2009-12-27 16:53:00)
by Nikita Leontiev
If you want to put subclass wnd proc in to class, for example CMyComboBox class, you will need to set it static and all functions and variables that it will use to static too. I think it isn't good. When I use subclassing, I usually create class, for example CMyComboBox, then put custom subclass proc in CMyComboBox.cpp and provide pointer to class instance through GWL_USERDATA....
Started 1 week, 1 day ago (2009-12-21 08:22:00)
by sebipinn
Thanks. I found another post where they explained this can be achieved through subclassing. Makes sense after thinking about it. Thanks for the response and help.
Started 2 days, 15 hours ago (2009-12-27 00:55:00)
by TomRay
En fait, il n'est pas possible de sous-classer un objet en dehors du processus dont il dépend. Citation: The reason for this rule is simple: Win32 processes have separate address spaces. A window procedure has an address in a particular process. In a different process, that address does not contain the same window procedure. As a result, substituting an address ...
Started 4 days, 13 hours ago (2009-12-25 02:58:00)
by Sydde
Indeed. One of the difficult things to get used to in Objective C/Cocoa is that method names are visible outside the bounds of the source code. When subclassing, one should take care not to accidentally override a superclass method by using an obvious name.
Started 1 week ago (2009-12-22 14:15:00)
by Aephyr
camickr wrote: I'm not sure I umderstand the OP's exact requirements, but as a general question why would you override a method, when a listener will do? You aren't changing the functionality of the addNotify() method, you are essentially treating it like a listener. Maybe that is the way things where done in AWT, but the AncestorListener was added for Swing so I would think this ...
Started 1 week, 1 day ago (2009-12-21 11:29:00)
by CliffsNotes
You have made progress. A few more things you need to do: 1. When your model object gets notification of observed object point and it calls notifyObservers , pass the point ( Obervable o ) as the argument. Then your update method in the main class gets two arguments: Observable o , which at this level is now the model itself and Object arg which in this case will be the o you ...