Isuru
Isuru

Reputation: 182

Problem with OnMeasureItem()

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!!!!

Upvotes: 0

Views: 764

Answers (1)

Isuru
Isuru

Reputation: 182

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

Upvotes: 1

Related Questions