Solved

Win Forms Class design

Posted on 2006-07-11
2
205 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
Comment Utility
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
Comment Utility
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

728 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now