Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8625139
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:42:30+00:00 2026-06-12T07:42:30+00:00

I have a standard Win32 tree view control. I’m putting a file name into

  • 0

I have a standard Win32 tree view control. I’m putting a file name into the root node. To avoid asking the user to use a horizontal scroll bar I would like to shorten the text using PathCompactPath to fit in the space available on the control.

enter image description here

So, in order to do this I need to measure the distance marked in the screenshot above. I know about TVM_GETITEMRECT but it returns a rect that includes the space taken up by the icon.

So, how can I obtain the metric I need? Is it even possible to do so?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T07:42:31+00:00Added an answer on June 12, 2026 at 7:42 am

    Are you specifying TRUE or FALSE for the wParam parameter of TVM_GETITEMRECT? It should be TRUE to get the node’s text rectangle. Once you have that, you can subtract the rectangles’s left pixel value from the client width of the TreeView to get the width you are looking for.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Say I have a bog-standard Win32 popup menu, and it's taller than the screen.
I have a standard list view setup with backbone that looks something like below.
Using the standard Win32 file I/O API's (CreateFile/ReadFile/etc), I'm trying to wait for a
I have a device that is controlled by standard win32 dlls. The device responses
I have standard iPad view controller which has a custom navigation bar at the
I have standard source code package under Linux which requires to run ./configure make
Is it possible to have standard war deployment, which can be deployed on tomcat
I've heard they have standard GUI guideline, but I can't seem to find a
I have a mobile site running with jQuery Mobile. I want to have standard
I have a standard table: I want to use jQuery to reformat the table,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.