I am trying to print information that is held in a CListView in report mode. I have about 12 - 15 columns that have been sized to the header and text in the column below with a LVSCW_AUTOSIZE_USEHEADER and then the user may have changed the widths of any colunn by moving the header separators. I want to replicate this column information (not necessarily in the same columns) in fields on the printed output.
I can get the width of each column in pixels from the LV_COLUMN struct but I'm not sure how to get the average number of characters that the column is sized for. If I could get the font that the list control is using then I could ask text metrics for the average character width and from that get the number of average chacters in each column. Since I know the printer font, I can size the printer fields to match the list control fields.
Basic question is: How can I ask the system for the font that a list control is using?
Can the user change a list control font?
Do different machines have different list control fonts?