[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Win Forms Class design

Posted on 2006-07-11
2
Medium Priority
?
215 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 2000 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] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

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…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

656 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