Solved

How to retain long file names in Win98 with CComboBox::Dir ?

Posted on 2004-10-30
195 Views
Last Modified: 2013-11-20
Hi experts,

I have a Ccombo Box which when pulled down will show the filenames with .txt extension. I use the following instructions and they work well on Win2000 and WinXP. However, running on Win98SE, I see the filenames become 8.3 format. I am using Microsoft Visual C++ 6.0.

m_cFileNames.ResetContent();
m_cPortfolios.Dir(DDL_READWRITE, _T("*.txt"));

What am I missing? What should I do to make the filenames show the full name in Win98.

Thanks,
jper
0
Question by:jper_hm
    3 Comments
     
    LVL 6

    Accepted Solution

    by:
    try this code

    CString strFile = GetProfilesDir() + _T("c*.icc");
         for (bool bMore = ff.FindFile(strFile), profiles=0; bMore; ++profiles)
             {
             bMore = ff.FindNextFile();
             m_combo.AddString( ff.GetFileName() );
             }

         Hope this helps
    0
     

    Author Comment

    by:jper_hm
    Thank You. This approach solves the problem.

    Regards,
    jper
    0
     
    LVL 6

    Expert Comment

    by:Amritpal Singh
    n e time
    most welcome
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Course: MongoDB Object-Document Mapper for NodeJS

    NodeJS (JavaScript on the server) is awesome, but some developers get confused about NoSQL when it comes to working in Node with MongoDB (NoSQL database). Do you need a better explanation of how to use Node.js with MongoDB? The most popular choice is the Mongoose library.

    Suggested Solutions

    Title # Comments Views Activity
    Strange date stored 22 93
    How to determine file rename from EventLog ? 2 31
    only14 challenge 19 52
    isEverywhere  challenge 19 38
    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…
    Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
    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.
    With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

    933 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

    23 Experts available now in Live!

    Get 1:1 Help Now