Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

kuphryn

Enable/Disable A Window in SplitView :: MFC

This topic is 5917 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi. I would like to know how to enable/disable a specific view inside a split window. For example, let there the split window comes default with three visible windows. ----- View1 ----- View2 ----- View3 ----- If the user select an option in the menu to hide view2 or maybe a calculated needs to disable view2, is there a way to do that in MFC? Most important that is the entire window must be redrawn. I am not sure how to redraw multiviews inside of main in SDI architecture. Thanks, Kuphryn

Share this post


Link to post
Share on other sites
Advertisement
I just got done messing with this stuff for my tools.

Check out this:

http://codeguru.com/splitter/show_hide_static_panes.shtml

Read the comments below because there are some enhancements people suggest. But this should do what you need.

-JT

Share this post


Link to post
Share on other sites
Thanks.

Wow! I am surprise Microsoft has not added a feature to hide a window in splitterwnd.

Kuphryn

Share this post


Link to post
Share on other sites
Unfortunately trying to show/hide panes of a splitter is pure torture... I agree Microsoft should have put something in there to make it easier.

One thing I''ve done on dynamic/docking splitters to make it slightly easier is to do a resize rather than an actual hide. That''s a lot faster than all the resetting that CodeGuru does, but it has a somewhat unfortunate side effect, namely that when you resize you will have a very small artifact from the original window that''s about a pixel wide because you can''t set a window width negative or zero and expect it to be happy about that.

-fel

Share this post


Link to post
Share on other sites
Thanks.

Resizing a view its the minimum possible is one alternative. Right now, I think it is the best solution without over complicating it.

Kuphryn

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!