Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Multiselect on CFileDialog (VC5)

Posted on 2000-05-11
2
Medium Priority
?
240 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 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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

715 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