Solved

Win Forms Class design

Posted on 2006-07-11
2
210 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

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…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

687 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