I have a question about software design pertaining in particular to MFC and Windows programming in general. Windows programs rely heavily on messages. Objects sends and receive messages. Is it conventional to keep classes independent one of one another and/or is it conventional to integrate all classes and objects into on system of classes?

For example, I have a simple doc/view (SDI) program. There is a function in doc called Divide(). This function performs a divide of two integers. Now, let say I have a dialog box that requires the use of division. The difference is that the dialog box is not meant to perform division. It requires division for another purpose. In the case above, is it conventional to send a message back to main frame and then redirect the message to doc to perfect the division? Is it conventional to just create a new function for that dialog box?

If it is conventional to create a new function for the dialog box, then how about if the similarity is a structure, or a class?

Messages in Windows open up new doors for programmers allowing programmers to try out more tools.