Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Knowning your classes - looking for suggestions!

Status
Not open for further replies.

pghsteelers

Technical User
Apr 21, 2006
121
US
Working through a book which currently is walking me through building a certain program, I come across building dialog boxes. In creating a new class to associate with that dialog box, he follows up by having you call the OnInitDialog() member function to intialize the dialog, finalized by having you add some lines of code.

The next part is what is throughing me for loops. He has you create a variable of data type CSpinButtonCtrol* . He follows up by telling you what this MFC Class does. Understanding the use, and reasoning behind the code isn't the problem, its knowing these useful (in this case class) exist.

This is where I thought I would look to the community on suggestions of finding out what everyone else does to know what is available by their IDE, or compiler, (whether it be Microsofts MFC, CLR..ect) or whatever else that has prefabricated code, whether it be a class as in this example or something else.

Do you hunt down a list of all current classes (again class as just an example) in (ie. MFC) and memorize, or at least know it's there, or what?

Any suggestions?
 
Most of the MFC classes are quite orthogonal. If you are using Visual whatever, you can always switch on expansion of class members (look in the edit menu, near the bottom). Say you have a CString called rope. When you type rope. and if you have the expansion switched on, a scroll box will appear telling you what members are available. As you go down each member, a tooltip will appear telling you what the parameters are. That is the one thing I really miss when I use other IDEs or when I work on vi in Unix.
 
xwb - thanks so much. You know the sad part is that I asked another question about getting at member functions and variables of prefabricated classes in another thread, and the most *helpful* advice I got in return was to look up the class.

However, you just answered that question in this thread with the direction to the "list member" menu option that I wasn't aware of.

Thanks so much.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top