Splitting a dialog up into multiple classes
I'm in the design phases of an MFC GUI, and I'd really appreciate some help here...
This GUI is going to contain one dialog that is rather large - it'll contain dozens of controls (listboxes, comboboxes, textboxes, buttons, etc) on it. Now normally I make one dialog its own class, but because this dialog is so big, I'd like to be able to partition it up into a number of classes.
Any tips on how I can do this? As an example, the dialog will contain about 8 textboxes that are logically grouped together on the dialog, and would ideally be in a class by themselves (say, TextboxDisplay). But then, how do I instatiate this class? Should it take 8 edit controls as arguments to its constructor, and the parent dialog class just passes in the 8 textboxes as arguments? Or is there a way to make TextboxDisplay responsible itself for creating the textboxes? What about the message map and the DoDataExchange() method? Can I somehow put these in TextBoxDisplay, or do they have to go in the parent class that actually represents the dialog?
It seems really hard to go OO with MFC, but I'm certainly trying, and I'd really appreciate any help.
Thanks a bunch,