Solved

Multiselect on CFileDialog (VC5)

Posted on 2000-05-11
2
217 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 50 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

What Security Threats Are You Missing?

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

Suggested Solutions

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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 video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

759 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

19 Experts available now in Live!

Get 1:1 Help Now