Grouping ctrls in a group box...?
-
Hi all, Firstly, how do I create a group box programmatically? Secondly, I want the following to work: m_MyGroupBox is my group box (CStatic). Surprise... m_MyGroupBox->ShowWindow(SW_HIDE). How can I make the controls "inside" the group box to also disappear? By simply saying that m_MyGroupBox is the parent when creating the inner ctrls? Thx, /Tommy
-
Hi all, Firstly, how do I create a group box programmatically? Secondly, I want the following to work: m_MyGroupBox is my group box (CStatic). Surprise... m_MyGroupBox->ShowWindow(SW_HIDE). How can I make the controls "inside" the group box to also disappear? By simply saying that m_MyGroupBox is the parent when creating the inner ctrls? Thx, /Tommy
You'll have to manually hide each of the controls. Setting the parent to the group box will break MFC's handling of dialog box controls, so I don't recommend doing it. Hope this helps,
Ryan
"Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"