Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello guys,


I am facing an issue in VC++, can anybody help?

I have two windows A and B.I open window A and do not close it ( clicking a icon lets say icon1 in toolbar).
Later, I open window B (clicking a icon lets say icon2 in toolbar), I see window A is getting hidden behind window B. well till now!!!

Now if again I click on icon1, still window A is behind window B? how can I fix this??

I need to have window A on top of window B.

Regards,
Joy
Posted
Comments
[no name] 17-Oct-14 8:58am    
Set the window's top most flag.
joyjhonson 20-Oct-14 7:38am    
Thanks
Richard MacCutchan 17-Oct-14 8:58am    
Without knowing something more about your code it is difficult to give a useful answer. Is WindowB a dialog or a normal window?

1 solution

What's about CWnd::SetWindowPos?
You could set wndTopMost if you would like to keep it on top.
But then window A is on top of every window.
Please let me/us know a bit more about your requirements, maybe we could help you a bit more.
 
Share this answer
 
Comments
joyjhonson 20-Oct-14 7:40am    
Thank you..it worked when i set wndTopMost in CWnd::SetWindowPos(). I could also find another way of doing it thats using BringWindowToTop() method.
C3D1 21-Oct-14 2:14am    
Please accept this solution if it solved your problem. Then the other members could see in the quick answers overview that this question is solved. :)
Thank you
joyjhonson 24-Oct-14 4:34am    
sure

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900