Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Show a list of currently open MDI windows in a popup menu Collapse All
Subject Author Date
Lynn Reid Aug 29, 2006 - 10:27 PM

Hello:

I’m rather new to Prof-UIs and I’m none too experienced at figuring out how to search the support forums. Is there a better way than using Google’s advanced search features and restricting the site to www.prof-uise.com? Anyway, on to the real question...

I’ve created an MDI application that uses CExtTabMdiWnd to display several documents at a time. The tabs are working fine. I like the little pulldown menu at the right side of the tabs that lists the currently open windows; it looks like a line atop a downward pointing triangle. I have a separate frame window located within an CExtControlBar which has a different view of the "topmost" MDI window.

Within the frame, I’d like a right-mouse-button popup menu that looks like:
My Command 1
My Command 2
Open Windows -> MDIWindow1
......................... MDIWindow2
......................... etc.

where the submenu to "Open Windows" is automatically updated. It would be really nifty if I could have the right arrow in the Openw Windows menu item be a rotated version of your tab implementation. I’ve already got the "My Command #" menu entries in place using CExtPopupMenuWnd (and some trial and error).

I imagine there’s a simple way to do this using your CExtTabMdiWnd, rather than loading up the menu programmatically each time. Could you please give me a detailed example of how to generate the popup submenu of MDI windows and how to track which one MDI document the user selects?

Many thanks
Lynn

Technical Support Aug 30, 2006 - 11:47 AM

You can find information about how to construct menu items at run time in the article: Constructing Menus Dynamically at Run Time. You can find how to enumerate MDI windows in the CExtPopupMenuWnd::UpdateMdiWindowsMenu method. This method constructs the list of MDI windows that you can see in all Prof-UIS MDI samples. The CExtMdiWindowsListDlg::_FillMDIWindowList method may also be helpful.

You can use the WM_MDIGETACTIVE message to determine which mdi window is active. The application sends this message to the MDI client window to retrieve a handle to the active MDI child window.

As for searching forums, this feature is supported albeit it is limited. If you switch to the Tree view by clicking the Tree View link on the Forum1.aspx?CID=40 page, you will see a Type keywords to search: edit at the bottom. You can search for words or exact phrases. In the latter case, use double quotes. Google search (e.g., "control bars" forum site:prof-uis.com) may also be useful but not all forum pages are yet indexed.