Accessing the members of another class with the help of ClassWizard.
When doing a CRecordSetView you have access to the CRecordSet data members in class wizard.
I use Formview with Dialog boxes. I want to be able to access the FormView datamembers directly from class wizard without having to define a member variable for the CDialog Class and then assigning the value to the CFormview member variable.
If you do it right you classwizard will create the following:
And I'm able to access the Formview Vars and edit them directly. Classwizard will list all the CFormView Vars so I can edit them directly.
I'm surprised that there is not much info on this approach to using CDialog since it is more effiecient (computing and memory wise) as well esier to code. I don't even have to filter ID_OK since the framework does it already. Data will only be updated if you hit OnOk.
VS6, it has a class wizard. I read that VS2003 and up don't have a class wizard, up until VS2010.
They actually did away with it in VS2002 that followed VS6, and you're correct they resurrected it in VS2010. IMO, I really liked the class wizard in VS6 and was missing it a big time in VS2002, but as time passed (8 years for god's sake) I got used to the other way so now I'm not sure if I'd be going back to the wizard in VS2010 any time soon. The Add Member and Add Function replacements introuced in VS2002 that stayed until VS2008 are so fickle and unreliable that I learned to code most of my class members manually (without using any sort of IDE automation).
Another thing that suffered a big time (in my opinion) is the Intellisense (since VS2003). Even though they added some good features to it (like the ability to unfold and view structures during debugging) it is still very slow to respond and at times doesn't show the correct or helpful info. I really want it to go back to the way it used to be in VS6 or VS2002.
On the sidenote, I'm not sure that I'd be using VS2010 any time soon either. The reason is simple -- the CRT and MFC (that I'm using the most) are so bloated in size, plus the code VS2010 compiler makes is only compatible with Windows XP and up, so I'm going to stick with VS2008 w/o SP1 for awhile.
A question I have to you, is it actually legal (or documented) to use class members like you do? It wouldn't cause some internal conflict with the MFC stuff itself, would it? (If you want to post a sample of what you're doing and I can test it to see if it works under VS2010)