The information in this article applies to:
SUMMARY
Tab stops can be used in a list box to align columns of information. This
article describes how to set tab stops in a list box and provides a code
example that demonstrates the process.
MORE INFORMATIONTabStops.exeFor more information about how to download files from the Microsoft Download Center, please visit the Download Center at the following Web address http://www.microsoft.com/downloads/search.aspand then click How to use the Microsoft Download Center. To set tab stops in a list box, perform the following three steps:
ExampleBelow is an example of the process. Tab stops are set at character positions 16, 32, 58, and 84. NOTE: For Win32, use LPARAM instead of LONG.
If the desired unit of measure is character position, then specifying tab positions in dialog units is recommended. Dialog units are independent of the current font; they are loosely based on the average width of the system font. Each character takes approximately four dialog units. NOTE: Under Windows 95, dialog base units for dialogs based on non-system fonts are calculated in a different way than under Windows 3.1. For more information, please see the following article in the Microsoft Knowledge Base: Q125681 How to Calculate Dialog Base Units with Non-system-based FontFor more control over the exact placement of a tab stop, the desired position should be converted to a pixel offset and this offset should be converted into dialog units. The following formula will take a pixel position and convert it into the first tab stop position before (or at) the desired pixel position:
Additional query words: win16sdk
Keywords : kbfile kbsample kbCtrl kbListBox kbNTOS kbNTOS350 kbNTOS351 kbSDKWin32 kbGrpUser kbWinOS kbWinOS95 |
Last Reviewed: December 4, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |