Click here to Skip to main content
Click here to Skip to main content

Rollout panel

, 14 Oct 2002
Rate this:
Please Sign up or sign in to vote.
This article explains how to create rollout panel (like in 3dsmax)


This control works like the 'Rollout panel' in 3dsmax. When you click on a checkbox, some additional controls are shown. Another click on a checkbox will hide controls. Notice that other controls in a dialog are also moved and the dialog itself is resized. I tried to find something like this on the CodeProject, but the only articles I found were about expanding dialogs, which has limited functionality in comparison with this. So I decided to write my own class for this control.

How to integrate it into existing code

  1. Create a dialog and place controls on it.
  2. Encircle controls you want to be dynamically shown or hidden with static box and set it's text to empty string, also place checkbox in the corner of it, as it is shown in the picture
  3. Set the proper IDs for checkbox and static (do not use IDC_STATIC because it will not work!). Let's say you have used IDs IDC_CHTYPE (for checkbox) and IDC_STTYPE (for static box)
  4. Associate variables with these two controls using Class Wizard. The should be of type CButton
  5. Copy ExpandingCheck.h and ExpandingCheck.cpp files into your source files directory
  6. In your dialog's .h file write:
  7. #include"ExpandingCheck.h" 
  8. Also in your dialog's .h file you have to find the variables created in Step 4 and make the Checkbox variable of type CExpandingCheck
  9. //{{AFX_DATA(CExpCheckTestDlg)
    CExpandingCheck m_chType; //I have changed this line
    CButton m_stType;
  10. In the constructor of your dialog, write:
  11. That's all!

If you have found any bugs or improved the code, feel free to email me.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Software Developer
Ukraine Ukraine
No Biography provided

Comments and Discussions

NewsSubtle Bug PinmemberJ.Kaminski10-Oct-07 4:31 
Generalcant get it to welcome [modified] Pinmemberrootdial26-Jun-06 5:08 
GeneralRe: cant get it to welcome [modified] PinmemberM A V26-Jun-06 5:45 
GeneralRe: cant get it to welcome Pinmemberrootdial26-Jun-06 8:40 
GeneralRe: cant get it to welcome PinmemberM A V26-Jun-06 10:30 
GeneralRe: cant get it to welcome Pinmemberrootdial26-Jun-06 20:12 
GeneralRe: cant get it to welcome PinmemberVasily Terkin15-Sep-06 5:28 
GeneralMaybe Patented Pinmembercompiler25-Nov-03 13:26 
GeneralRe: Maybe Patented PinmemberSynetech1-Jun-05 12:28 
GeneralRe: Maybe Patented PinmemberRage_bla8-Oct-05 15:21 
Generalwrong refresh PinmemberSancho19-Oct-02 0:26 
GeneralWell done... PinmemberAlessandro Falappa18-Oct-02 8:08 
GeneralMe like, but... Pinmemberhenchook15-Oct-02 23:33 
GeneralNice control... PinmemberMarc Clifton15-Oct-02 5:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.150129.1 | Last Updated 15 Oct 2002
Article Copyright 2002 by M A V
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid