Solved

Win Forms Class design

Posted on 2006-07-11
2
208 Views
Last Modified: 2010-04-24
Hi,

This is a ranther general question... Working with windows forms under VC++2003, I what would be the best approach to split forms in different clases. For example, if I would want to have a menu for formX deployed in a different class, what is the best approach to register system events (like menu clicks, etc). I'm guessing this should be straigh forward, but my refference books do not cover this at all. (Incidently, any good reccomendations for VC++ forms books (not C#) ?

Thanks,
Alex
0
Comment
Question by:bluedog666
2 Comments
 
LVL 15

Expert Comment

by:lakshman_ce
ID: 17087059
Did you mean having the members of Form into a different class?

You can refer to this book
http://www.microsoft.com/MSPress/books/6701.asp
0
 
LVL 48

Accepted Solution

by:
AlexFM earned 500 total points
ID: 17088082
I can think about two ways:
1) Write two separate levels - UI and other processing. Form class is used only for UI and passes all actual tasks to other classes. Something like MFC Document-View.
2) Using user controls which encapsulate some functionality.

Moving menu to different class looks difficult, it creates more problems than helps.

Additional recommendation (which is not exactly what you expect) - use C# for GUI development. I don't see any reason for using C++/CLI for GUI, databse and WEB development.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The following diagram presents a diamond class hierarchy: As depicted, diamond inheritance denotes when two classes (e.g., CDerived1 and CDerived2), separately extending a common base class (e.g., CBase), are sub classed simultaneously by a fourt…
In Easy String Encryption Using CryptoAPI in C++ (http://www.experts-exchange.com/viewArticle.jsp?aid=1193) I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question