Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Multiselect on CFileDialog (VC5)

Posted on 2000-05-11
2
Medium Priority
?
244 Views
Last Modified: 2013-11-20
I can only select 13 files, if more than this number the GetPathName or GetNextPathName will return a string "||", what's wrong with this ?
0
Comment
Question by:ahTri
2 Comments
 

Author Comment

by:ahTri
ID: 2803205
look like 13 file-names overload the buffer or something.
0
 
LVL 3

Accepted Solution

by:
V_Bapat earned 150 total points
ID: 2804051
Hi ahTri
This is because CFileDialog set the buffer which stores the file names(lpstrFile member of OPENFILENAME struct) to 260 chars.

To verify this call ::CommDlgExtendedError function and you will get the error : FNERR_BUFFERTOOSMALL

You can derive a class from CFileDialog and set the buffer size to what you want.

Download the sample application from this site:
http://support.microsoft.com/download/support/mslfiles/OfnKing.EXE 

The buffer size is defined by the member variable m_szBigBuffer in CustomFileDialog.h

Try it out.

Vicky
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
In this post we will learn different types of Android Layout and some basics of an Android App.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

886 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