# Windows: ListView grid height

This topic is 2532 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hey guys,

I need to have an input grid in my program. I have it working fine except for one detail. The grid itself is of fixed height, and I created it like such:

 VialGrid = CreateWindowEx(NULL, WC_LISTVIEW, "", WS_CHILD | WS_BORDER | LVS_REPORT | LVS_EDITLABELS | LBS_NOTIFY, 5, 270, 530, 250, MasterWindowHandle, (HMENU)ID_PDS_VIALGRID, Instance, NULL); //add gridlines to the vial grid box ListView_SetExtendedListViewStyle(VialGrid, LVS_EX_GRIDLINES); 

So the height of the overall window is 250, and that's where I want it to stay. The problem is the grid at that height displays about 15 and a half rows. I need for it to display exactly 11 rows. Which means I need to change the height of those rows. But I don't see a way to do that. There is a LVM_SETCOLUMNWIDTH message, but I don't see any corresponding LVM_SETROWHEIGHT message. What do I need to do to modify the row heights?

##### Share on other sites
Handle WM_MEASURE_ITEM for the list view. Windows will send this to the list views parent once: MSDN

1. 1
2. 2
Rutin
23
3. 3
JoeJ
20
4. 4
5. 5

• 17
• 40
• 23
• 13
• 13
• ### Forum Statistics

• Total Topics
631730
• Total Posts
3001917
×

## Important Information

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!