|
-
August 13th, 1999, 12:37 PM
#1
Calling a view from the frame class
I have an app that posts mesages with HWND_BROADCAST. The documentation says that "The message is posted to all top-level windows in the system, including disabled or invisible unowned windows, overlapped windows, and pop-up windows. The message is not posted to child windows."
The problem is that I have an MDI app, so I get the message in my MainFarame class and need to call the method in my view class to process the action. How do I call the method? I have a pointer to the document class.
-
August 13th, 1999, 01:44 PM
#2
Re: Calling a view from the frame class
I tried the following code:
void CMainFrame::OnSystemAlert()
{
CWindowsProcessView* p = (CWindowsProcessView*)AfxGetMainWnd();
p->InsertAlert(1);
p->SendMessage(WM_COMMAND,0,0);
}
It compiles but gives me an exception breakpoint.
-
August 13th, 1999, 02:01 PM
#3
Re: Calling a view from the frame class
I tried the following code:
void CMainFrame::OnSystemAlert()
{
CWindowsProcessView* p = (CWindowsProcessView*)AfxGetMainWnd();
p->InsertAlert(1);
}
It compiles but gives me an exception breakpoint.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|