Hi all, I am in need of a suggestion. My problem is a simple one, but it's long to explain. If you have a little time please read, it won't be a large brain-consuming problem.


My application has a dialog (single modal dialog box) with a lot of controls in it. For every button in the dialog, the application has to perform a different task (which is encapsulated into classes).

So for every task, a function allocate a C++ class like

Code:
Button1()
{

// Task 1
CClassTask1 *m_task1 = new CClassTask1(parameters..);

.. 


delete m_task1;

}
My problem is: These classes must log their activity with strings like

CClassTask1:
Code:
....

cout << "I am working, 43% of work done" << std::endl;

...

How to communicate back to main window? I'd prefer not using forward declarations because these classes may mess up something with the main window using MFC (while these classes do not)


I need something like

Trace("I am working, 43% of work done");

callable from classes, and that string must show in a edit box (log box) in the main window.


If I was not clear, please feel free to ask me to be more "understandable".

Thank you