Should be an easy question.. Splitter
-
Hello, How can I permanently set the splitter size? For example: Instead of the Left / Right view I have a split from left to right so I have a top and a bottom. I want the bottom view to always stay the same height even when the window is being resized. I'm a newbie with splitters and am unsure how I can keep my bottom view set to a permanent height. I assume I should handle MainFrame WM_SIZE and somehow set the splitter location.. Any ideas? Thanks, Rob
-
Hello, How can I permanently set the splitter size? For example: Instead of the Left / Right view I have a split from left to right so I have a top and a bottom. I want the bottom view to always stay the same height even when the window is being resized. I'm a newbie with splitters and am unsure how I can keep my bottom view set to a permanent height. I assume I should handle MainFrame WM_SIZE and somehow set the splitter location.. Any ideas? Thanks, Rob
try this: CRect rect; GetClientRect(&rect); int x = rect.Width()/2; Then set the width of your pane = x Regards
-
Hello, How can I permanently set the splitter size? For example: Instead of the Left / Right view I have a split from left to right so I have a top and a bottom. I want the bottom view to always stay the same height even when the window is being resized. I'm a newbie with splitters and am unsure how I can keep my bottom view set to a permanent height. I assume I should handle MainFrame WM_SIZE and somehow set the splitter location.. Any ideas? Thanks, Rob
Sorry, this isn't a solution to your problem:)
-
Hello, How can I permanently set the splitter size? For example: Instead of the Left / Right view I have a split from left to right so I have a top and a bottom. I want the bottom view to always stay the same height even when the window is being resized. I'm a newbie with splitters and am unsure how I can keep my bottom view set to a permanent height. I assume I should handle MainFrame WM_SIZE and somehow set the splitter location.. Any ideas? Thanks, Rob
CSplitterWnd
has methods for getting and setting the dimensions of static splitters:GetRowInfo
,SetRowInfo
,GetColumnInfo
, andSetColumnInfo
. In your frameWM_SIZE
handler you can compute the size of the splitter and call one or more of these methods to set it. After you have the splitter(s) set the way you want, you have to callRecalcLayout()
to update the splitter layout.
Software Zen:
delete this;