Hi!
I've tried to send a message from the CMainFrame to the CView when a timer event occurs. When I do so two error messages are shown and I'm forced to close the application.

This is the part of the code that sends my message:

CView* pView = GetActiveView();
HWND hView = pView->m_hWnd;
::PostMessage(hView, WM_DRAWALL, 0, 0);

I've tried to locate the error, and I believe it occurs in the first line when I try to get a pointer to the CView class. I've also tried to send the same message when you press a button and it works with no problems at all.

Is there anyone who can help me fix this?

By the way; I'm using MSVC++ 6.

All help is really appreciated!

/Richard Peterson