CListCtrl in LVS_ICON mode with no text
-
I am working on implementing a CListCtrl derived class that functions similar to a control bar. Each icon functions like a button, icon only with no text assigned, and the layout (# of rows/columns) is adjusted as the size of the control changes. All the icons are displayed packed together with a single pixel separating them vertically and horizontally. I have just about everything working, but have run into one problem I cannot find a solution for. When there are multiple rows displayed in the control, even though no text is displayed for any icon, space for the text is being calculated. Clicking on an icon in a row other than the top row results in the icon in the row above being selected - if the click happens in the space where the text of the upper item would appear, if there were any. To put it another way, the space where text would appear for icon in Row A overhangs the icons in Row B. Clicking in this 'overhang' space results in the icon in Row A being selected, while visually it appears that the click happened well within Row B. Any ideas on how to make the list control not calculate the space for the text label?
-
I am working on implementing a CListCtrl derived class that functions similar to a control bar. Each icon functions like a button, icon only with no text assigned, and the layout (# of rows/columns) is adjusted as the size of the control changes. All the icons are displayed packed together with a single pixel separating them vertically and horizontally. I have just about everything working, but have run into one problem I cannot find a solution for. When there are multiple rows displayed in the control, even though no text is displayed for any icon, space for the text is being calculated. Clicking on an icon in a row other than the top row results in the icon in the row above being selected - if the click happens in the space where the text of the upper item would appear, if there were any. To put it another way, the space where text would appear for icon in Row A overhangs the icons in Row B. Clicking in this 'overhang' space results in the icon in Row A being selected, while visually it appears that the click happened well within Row B. Any ideas on how to make the list control not calculate the space for the text label?