Solved

Win Forms Class design

Posted on 2006-07-11
2
207 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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
c++ class logger 6 105
how do i save an image to a table using c# 10 88
Create a progress bar for timer 4 292
3D Surface or Implicit Fairing Visual Studio 4 116
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

810 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