October 29, 2025, 05:56:03 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


cell height in listview

Started by dossic, September 03, 2008, 09:24:02 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dossic

Hi everybody, hope everything is doing fine.

Do you know if there is a simple way to calculate the height of cells in listviews?

Thanks   Carlo

sapero

Sure, send a LVM_GETITEMRECT message (0x100E) to list view. Note, you need at least one item in the list.

WINRECT rc
rc.left = 0 /* LVIR_BOUNDS */

SendMessage(win, 0x100E, 0 /*item index*/, &rc, controlID)
height = rc.bottom - rc.top + 1

dossic

It works great!

Thanks so much for the "real-time" answer, I really appreciated.

Carlo