BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Deactivate MDI Child

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Native API)
View previous topic :: View next topic  
Author Message
Kent
Guest





PostPosted: Fri Apr 28, 2006 4:03 am    Post subject: Deactivate MDI Child Reply with quote



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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Native API) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.