Thread View: borland.public.cppbuilder.nativeapi
1 messages
1 total messages
Started by Kent
Fri, 28 Apr 2006 03:14
Deactivate MDI Child
Author: Kent
Date: Fri, 28 Apr 2006 03:14
Date: Fri, 28 Apr 2006 03:14
32 lines
2225 bytes
2225 bytes
I have a MDI app where specific MDI childs are displayed when a specific tab from a TTabSet is selected. For example, if Tab1 is selected, its associated childs are displayed with this call: ShowWindow(TheForm->Handle, SW_SHOW); If Tab2 is next selected, Tab1's childs are hidden with this call: ShowWindow(TheForm->Handle, SW_HIDE); and Tab2's childs are displayed with ShowWindow(TheForm->Handle, SW_SHOW) as above. When a tab is selected, I activate that tab's highest z-order child window with this call: SendMessage(ClientHandle, WM_MDIACTIVATE, (WPARAM) MDIChild->Handle, 0); Thus, this window becomes the new ActiveMDIChild. If I delete (not hide) Tab2's childs, there are no visible MDI child windows on screen and the former ActiveMDIChild's menu is "unmerged" from the Application's main menu as no MDI child is activated/focused. If I reselect Tab1, its MDI childs are displayed and the new ActiveMDIChild's menu is merged back in. The problem is when I then reselect Tab2 and it contains no windows. Although Tab1's windows are hidden, it still contains the ActiveMDIChild and the main menu remains merged with the invisible child's menu. I can't find a way to deactivate this hidden child to force the main menu to unmerge. Could someone offer some ideas on how to accomplish this? Thanks, Kent
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads