Microsoft KB Archive/246364

From BetaArchive Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

PRB: LVM_SETCOLUMNWIDTH Special Values Set Incorrect Column Width

Q246364



The information in this article applies to:


  • Microsoft Win32 Application Programming Interface (API), included with:
    • Microsoft Windows NT Server version 4.0
    • Microsoft Windows NT Workstation version 4.0
    • Microsoft Windows 98
    • Microsoft Windows 95





SYMPTOMS

Sending a list view control an LVM_SETCOLUMNWIDTH message where the new width is set to LVSCW_AUTOSIZE or LVSCW_AUTOSIZE_USEHEADER will not work as expected for column 0 in report mode if an indent value is specified for any item.



CAUSE

The LVSCW_AUTOSIZE and LVSCW_AUTOSIZE_USEHEADER both are used to calculate the width of a column header based on either the header test and item text length. On COMMCTL32.DLL versions 4.70 and 4.72, the indent is not included in this calculation.



RESOLUTION

This has been fixed as of 5.80 of COMCTL32.dll. For versions prior to 5.80 the width of the column must be set by specifying a width in the lParam of the LVM_SETCOLUMNWIDTH message.



MORE INFORMATION

For more information on obtaining the latest version of COMCTL32.dll refer to the following Knowledge Base article:

Q186176 Redistribution of COMCTL32.DLL



REFERENCES

For additional information, please see the following article in the Microsoft Knowledge Base:


Q186176 Redistribution of COMCTL32.DLL

Additional query words:

Keywords : kbListView kbOSWinNT400 kbGrpDSUser kbOSWin95 kbOSWin98 kbDSupport
Issue type : kbprb
Technology : kbAudDeveloper kbWin32sSearch kbWin32API


Last Reviewed: December 16, 2000
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.