CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 1999
    Posts
    2

    Fitting paths into static text area



    Hi!


    I would like to show some path information in a static text area

    but when the path gets too long, it will be cut off.


    M$ sometimes uses three dots to shorten the information like this:

    C:\Programs\Microsoft Office\Office\Outlook\blabla.dat

    will be transformed into

    C:\Programs\...\Outlook\blabla.dat


    Is there a CStatic derived class doing this job available?

  2. #2
    Join Date
    Mar 1999
    Posts
    4

    Re: Fitting paths into static text area


  3. #3
    Join Date
    Apr 1999
    Posts
    383

    Re: Fitting paths into static text area



    Use PathCompactPath or PathCompactPathEx.


    Dave

  4. #4
    Join Date
    Mar 1999
    Posts
    2

    Re: Fitting paths into static text area



    Hi again.


    First: Thanks a lot for the fast response!


    Second: Am I wrong or are these API functions first available in

    VC++ 6.0? I have to use VC 4.2b due to an error in the vc6 release

    mode.


    At the moment I prefer the the CStatic_FileSpec-Class from the

    other resonse. It uses DrawTextEx() together with an (undocumented?!?)

    style named DT_PATH_ELLIPSIS.


    Joachim

  5. #5
    Join Date
    Apr 1999
    Posts
    383

    Re: Fitting paths into static text area



    > Am I wrong or are these API functions first available in VC++ 6.0?


    I don't think they are specific to VC++ 6.0, they are part of the Internet CLient SDK (also known as the Internet Explorer 4.0 Author's Toolkit) which was synched with the final release of MS Internet Explorer 4.0. I think they were supplied with VC++ 6.0, having been previously available separately.


    > At the moment I prefer the the CStatic_FileSpec-Class from the other resonse


    If the alternative approach is better suited, go for it :-)


    Dave




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured