-chetan verma final year B-Tech(CSE) Indian School of Mines Dhanbad India
[EMAIL PROTECTED] [EMAIL PROTECTED] +919835108609 --- On Thu, 5/22/08, chetan verma <[EMAIL PROTECTED]> wrote: From: chetan verma <[EMAIL PROTECTED]> Subject: Re: [c-prog] Message issued when z order changes To: [email protected] Date: Thursday, May 22, 2008, 11:41 AM Thanks thomas for such a quick reply. If I have any doubts I'll bother you again :). regards chetan. -chetan verma final year B-Tech(CSE) Indian School of Mines Dhanbad India verma.chetan@ gmail.com [EMAIL PROTECTED] com +919835108609 --- On Thu, 5/22/08, Thomas Hruska <[EMAIL PROTECTED] .com> wrote: From: Thomas Hruska <[EMAIL PROTECTED] .com> Subject: Re: [c-prog] Message issued when z order changes To: [EMAIL PROTECTED] com Date: Thursday, May 22, 2008, 11:23 AM chetan verma wrote: > Hi, > I am using Microsof Visual Studio 2005 and Windows Xp SP3. I implemented a > "drop down tree" control using a CComboBox and a CTreeCtrl. Everything is > fine except one thing is bothering me. What if the tree is dropped down, and > another window pops-up to the foreground. I want to hide my tree control when > any such thing happens. Is there any way for this, I tried trapping the > WM_KILLFOCUS, WM_WINDOWSPOSCHANGE D messages but the tree control doen't > seems to be getting these messages when another window pops up and the tree > is moved back in the z order (I checked this by pressing the F1 key to raise > the help dialog of my application) . The tree is moved back but is still > there. > > I can check for F1 and other keys for my application, but what if some other > application say a chat window just pops-up. > > I tried to find any message issued when a window is moved back in zorder, but > couldn't find any. If you have any idea how should I proceed please help me. > > If you have any doubts please let me know. > > Thanks > chetan. > > -chetan verma > final year B-Tech(CSE) > Indian School of Mines > Dhanbad > India Similar stuff has been done before: http://www.codeproj ect.com/KB/ combobox/ checkcmb. aspx http://www.codeproj ect.com/KB/ combobox/ TreeCombo. aspx http://www.codeproj ect.com/KB/ combobox/ combotree. aspx You'll probably find an answer among those three projects. -- Thomas Hruska CubicleSoft President Ph: 517-803-4197 *NEW* MyTaskFocus 1.1 Get on task. Stay on task. http://www.CubicleS oft.com/MyTaskFo cus/ Got it working!! The projects mentioned by thomas were really helpful. Only one thing was missing that I got after some more googling. There is a message WM_ACTIVEAPP sent when a window belonging to a different application than the active window is about to be activated. The message is sent to the application whose window is being activated and to the application whose window is being deactivated. Now trapping this message makes sure, if a window pops-up to the front the tree will hide itself. thanks chetan
