MFC Programming question

I'm trying to customize the file open dialog in Windows 95. The basic method of designing a child template and having the controls automatically added to the bottom of the default dialog works fine. However, I want to place these controls to the side of the default controls. So I'm using the stc32 method. However, I'm getting some weird placement behaviour. Is there a way to pull in the default template (like you would if you were making changes to the win 3.1 version of the default dialog) so that I can quickly at my controls and be done with it?

My controls are a list box, a static label, and two buttons. I don't know how this formatting is goning to look but the basic gist is I'd like two buttons beside the Open and Cancel buttons and I'd like the list box to be the height of the window and to the right of the default controls.

Look in |____________|                     Files Selected
 ______________________________              ___________
|                              |            |           |
|                              |            |           |  
|                              |            |           |  |______________________________|            |           |
                                            |           |
File name:    [EF]   [open btn]  [my btn]   |           |
Files of type [EF]   [cncl btn]  [my btn2]  |___________|

I'm using DevStudio vs 5.0 on Windows 95

Thank you
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

winkleAuthor Commented:
Edited text of question
winkleAuthor Commented:
Edited text of question
What you have to do is to place static control with ID stc32 into your template and place your controls below and on the right side of this control. This is the only way to add controls.
  If you have ID of controls which you want to move/hide you can use get pointer to them CWnd* pWnd = GetParent()->GetDlgItem( ID ).

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
winkleAuthor Commented:
I've tried about 10 different permutations of the stc32 method. The suggestion of putting all of my controls below and to the right of the static control (stc32) then the top of the list box winds up below and to the right of the controls in the default file open dialog. I understand, now, that this is the only way to do this. Regarding your suggestion to get the pointer to the default controls...How can I find out the IDs for Win 95 controls. I get pointed to dlgs.h and Fileopen.dlg for old style file open dialog, but haven't found anything for the win 95 version.

There is template for new "FileOpen" dialog

FONT 8, "MS Sans Serif"
    LTEXT           "Look &in:",stc4,7,6,41,8,SS_NOTIFY
    COMBOBOX        cmb2,50,3,138,100,CBS_DROPDOWNLIST |
                    WS_VSCROLL | WS_TABSTOP
    LTEXT           "",stc1,188,2,82,17,NOT WS_GROUP | NOT WS_VISIBLE
    LISTBOX         lst1,4,20,272,85,LBS_SORT | LBS_NOINTEGRALHEIGHT |
    LTEXT           "File &name:",stc3,5,112,36,8,SS_NOTIFY
    EDITTEXT        edt1,54,110,155,12,ES_AUTOHSCROLL
    LTEXT           "Files of &type:",stc2,5,128,46,8,SS_NOTIFY
    COMBOBOX        cmb1,54,126,155,53,CBS_DROPDOWNLIST |
                    WS_VSCROLL | WS_TABSTOP
    CONTROL         "Open as &read-only",chx1,"Button",BS_AUTOCHECKBOX |
    DEFPUSHBUTTON   "&Open",IDOK,222,110,50,14
    PUSHBUTTON      "Cancel",IDCANCEL,222,128,50,14
    PUSHBUTTON      "&Help",pshHelp,222,145,50,14
Customization Guidelines
You can customize any of the common dialog boxes. You might, for instance, want to hide some of the original controls, add a few new controls, or enlarge a dialog box. If your application subclasses controls in any of the common dialog boxes, the subclass must be done during the processing of the WM_INITDIALOG message in the application’s hook function. This allows the application to receive the control-specific messages first.
In general, it’s not a good idea to customize the common dialog boxes too severely. After all, one of their chief benefits is a look and feel consistent with the rest of the Windows 95 user interface. I’d suggest that you customize these dialog boxes only if necessary, leaving the original look intact as much as possible. Users won’t be confused by small modifications, however, such as a change in the size of the dialog box or the addition of a new control or two.

 I got it from MSDN - January 97 CD "Learning New IDs"
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.