Solved

TOpenSaveDialog

Posted on 1997-11-19
2
290 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
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 …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

726 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