#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    3
    Rep Power
    0

    Question on MFC CFileDialog


    I am able to successfully store the pathname which i selected in the FileDialog... but somehow the sequence is wrong.

    For example i have1.txt, 2.txt, 3.txt, 4.txt; 4 files.
    i select from 1 to 4, all the filename is in my array; but my first array which is [1] did not store 1.txt.. all the sequence is wrong.
    I have tried 2 different PC it seems to give me different sequence.

    Anyone knows what has happen actually? Any ways to solve the problem?

    Thanks & appreciate your help.
  2. #2
  3. ASP.Net MVP
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Aug 2003
    Location
    WI
    Posts
    4,378
    Rep Power
    1510
    Arrays are zero based, so 1.txt would be [0]. [1] would be 2.txt.
    Primary Forum: .Net Development
    Holy cow, I'm now an ASP.Net MVP!

    [Moving to ASP.Net] | [.Net Dos and Don't for VB6 Programmers]

    http://twitter.com/jcoehoorn
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    3
    Rep Power
    0
    not that... start from [0] also the same...
    the sequence is just messed up. :(
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jan 2002
    Location
    Seattle WA
    Posts
    863
    Rep Power
    14
    Usually in Windows, groups of filenames are returned in the order they're selected. You'll probably have to apply your own sort method to the array.

IMN logo majestic logo threadwatch logo seochat tools logo