[ Home | Contents | Search | Next | Previous | Up ]
Date: 11/30/99
Time: 12:05:13 AM
A. What you're trying to do is acomplished by using a template, I've
never saw any example using just OWL, but if you just want to place static text or a
bitmap, something that doesn't need the user interaction it's very simple, if you want to
place a button or anything that requires a rensponse it's a bit more complicated:
1) Open your resource file with 'Text Edit' and place the folowing
line:
#include <dlgs.h>
Save and close it
2) Create a Dialog without caption
a) Window Type - Child
b) Clipping - Clip Siblings
3) Place a Static Text with ID stc32 (the value is 1119, and it's found
in dlgs.h), this Static Text will be replaced by real FileOpenDialog, every other control
you put around it will apear around the FileOpenDialog at run time
4) To display the dialog use something like this:
TOpenSaveDialog::TData FileData;
// The OFN_EXPLORER flag must be present, if
not the entire dialog will be
// replaced by the template
FileData.Flags |= OFN_FILEMUSTEXIST |
OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT;
FileData.SetFilter("All Files
(*.*)|*.*|");
// IDD_OPENTEMPLATE is the ID of the template
dialog
TFileOpenDialog FileOpenDialog
(GetMainWindow(), FileData,
IDD_OPENTEMPLATE);
if (FileOpenDialog.Execute() == IDOK)
OpenFile();
Wenderson Teixeira