views:

25

answers:

1

Hi,

I used OnMeasureItem() in my MFC ListControl to increase the height of the rows, and added WM_ON_MEASUREITEM() message in the Map. THe code I used is as follows:

void CListCtrlTestDlg::OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct)

{

if( nIDCtl == IDC_LIST1 )//IDC_LIST1 is my ListControl ID

  {

      lpMeasureItemStruct->itemHeight += 20;

  }

}

It doesn't Work. Any suggestion what the problem is???

Thank You!!!!

+1  A: 

Just had to set 'Owner Draw Fixed' property to 'TRUE'. Works fine now :)

Isuru