Solved

Multiselect on CFileDialog (VC5)

Posted on 2000-05-11
2
234 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
[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: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

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

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…
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.
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.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

630 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