Hiding tab control for CPropertySheet
-
I'm writing a quick options dialog app, but am a little rusty with my MFC. In short, I have a list box to the left and a property sheet containing pages corresponding to the items in the list box. However, I want to hide the tab control of the property sheet and move the pages up to match the top of the list box. Hiding the tab control is easy: CPropertySheet::GetTabControl()->ShowWindow(FALSE) I then went down the path of grabbing the rects of things and subtracting, but I can't help but think I'm making this more complicated than it needs to be. (I did this once back in 2005, but don't have that code and can't remember what I did.)
-
I'm writing a quick options dialog app, but am a little rusty with my MFC. In short, I have a list box to the left and a property sheet containing pages corresponding to the items in the list box. However, I want to hide the tab control of the property sheet and move the pages up to match the top of the list box. Hiding the tab control is easy: CPropertySheet::GetTabControl()->ShowWindow(FALSE) I then went down the path of grabbing the rects of things and subtracting, but I can't help but think I'm making this more complicated than it needs to be. (I did this once back in 2005, but don't have that code and can't remember what I did.)
The MSDN article has apparently been removed, but someone here has posted most of the code from it.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
-
I'm writing a quick options dialog app, but am a little rusty with my MFC. In short, I have a list box to the left and a property sheet containing pages corresponding to the items in the list box. However, I want to hide the tab control of the property sheet and move the pages up to match the top of the list box. Hiding the tab control is easy: CPropertySheet::GetTabControl()->ShowWindow(FALSE) I then went down the path of grabbing the rects of things and subtracting, but I can't help but think I'm making this more complicated than it needs to be. (I did this once back in 2005, but don't have that code and can't remember what I did.)
Did you consider using [CMFCPropertySheet Class](https://msdn.microsoft.com/en-us/library/bb981937(v=vs.140).aspx) instead?
-
Did you consider using [CMFCPropertySheet Class](https://msdn.microsoft.com/en-us/library/bb981937(v=vs.140).aspx) instead?
Ah, that's what I needed. Thank you very much. :thumbsup:
-
Ah, that's what I needed. Thank you very much. :thumbsup:
You are welcome! :)