Solved

TOpenSaveDialog

Posted on 1997-11-19
2
287 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn how to count occurrences of each item in an array.

758 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now