-
December 5th, 2010, 06:05 AM
#1
MDI Child windows and the OnIdle Message
Hello,
I'd like to ask how do I specify which child Window(s) I am talking to in MDI while
I am using the OnIdle message.
For example
Code:
void CApp::OnNewWinA()
{
POSITION curTemplatePos = GetFirstDocTemplatePosition();
while(curTemplatePos != NULL)
{
CDocTemplate* curTemplate =
GetNextDocTemplate(curTemplatePos);
CString str;
curTemplate->GetDocString(str, CDocTemplate::docName);
if(str == _T("Hello"))
{
curTemplate->OpenDocumentFile(NULL);
return;
}
}
}
.....
// And same for other windows
BOOL CApp::OnIdle(LONG lCount)
{
// TODO: Add your specialized code here and/or call the base class
return CWinApp::OnIdle(lCount);
}
Just more background info, I am working on a project which involves DX9 and MDI
I need Windows to feed data to one of the child windows while its idle while the other one
is displaying tabular data. You can see from the above code snippet, I can refer to "Hello" as the child window I am communicating with while I am not sure what to do with "OnIdle" when I want to talk to "Hello". Any help would be greatly appreciated!
Thanks
Jack
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
|