Solved

TOpenSaveDialog

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

734 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