To get all windows thru all open documents in MDI application in MFC
-
Hello, I have an MDI application in MFC, wherein I am opening several documents, my question is how to get all the child frame windows thru the document pointer? I am using functions GetFirstDocTemplatePosition and GetNextDocTemplate. But thru those how can I get all the child frame windows. Please help. Software Developer Sanjay Khapre
-
Hello, I have an MDI application in MFC, wherein I am opening several documents, my question is how to get all the child frame windows thru the document pointer? I am using functions GetFirstDocTemplatePosition and GetNextDocTemplate. But thru those how can I get all the child frame windows. Please help. Software Developer Sanjay Khapre
One way could be to use the FindWindow() function I haven't tried it myself but if you get success doing the same please intimate me Vision is Always important and so is your ATTITUDE. Wishes. Anshuman Dandekar
-
Hello, I have an MDI application in MFC, wherein I am opening several documents, my question is how to get all the child frame windows thru the document pointer? I am using functions GetFirstDocTemplatePosition and GetNextDocTemplate. But thru those how can I get all the child frame windows. Please help. Software Developer Sanjay Khapre
Have you tried CWnd::GetNextWindow. MSDN description of function says "Searches for the next (or previous) window in the window manager’s list. The window manager’s list contains entries for all top-level windows, their associated child windows, and the child windows of any child windows. If CWnd is a top-level window, the function searches for the next (or previous) top-level window; if CWnd is a child window, the function searches for the next (or previous) child window." Use this function on main frame window . In document class you can get main window by using function AfxGetMainWnd