Solved

TOpenSaveDialog

Posted on 1997-11-19
2
288 Views
Last Modified: 2013-12-26
I cannot seem to be able to manipulate the multiple files I select while using the common dialog <TOpenSaveDialog>.  I use the following code:
TOpenSaveDialog::TData *pWndwFileOpenData;
pWndwFileOpenData =
new TOpenSaveDialog::TData(OFN_PATHMUSTEXIST |
                           OFN_HIDEREADONLY  |
                           OFN_FILEMUSTEXIST |
                           OFN_ALLOWMULTISELECT,
      "Report Files(*.rep)|*.rep", 0, "", "REP");
enables me to set up the common dialog box in order to execute it.  But despite being able to execute it I cannot - or better yet do not understand how to use the multiple files that I selected from the open dialog box.

Please Help!!!  
0
Comment
Question by:yakhu
2 Comments
 

Author Comment

by:yakhu
ID: 1299478
Edited text of question
0
 
LVL 3

Accepted Solution

by:
LucHoltkamp earned 100 total points
ID: 1299479
The TData structure does not contain any fields to put multiple in, so they all go in the one filename field. Since OWL usually simply wraps around the WIN32 API it's likely to be the same. Look in the Win32 online help for the OPENFILENAME struct. Under Flags/OFN_MULTISELECT and you'll read:

When this flag is set, the lpstrFile member points to a buffer containing the path to the current directory and all filenames in the selection. The first filename is separated from the path by a space. Each subsequent filename is separated by one space from the preceding filename. Note that for the new Explorer-style dialogs (dialogs that have the OFN_EXPLORER flag set), a single null character, \0, separates the filenames, and two null characters, \0\0, terminate the entire string.

I suppose you'll be able to find out the details (I've read somewhere that with OWL the filenames are separated by \0) and hope this helps.
.luc.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Matthew
I am a very big proponent of technology compliance standards and strive to meet such criteria in all of my work. That includes my site, which is 100% XHTML 1.0 compliant as determined by the World Wide Web Consortium. https://www.matthewstevenkel…
This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question