How to set dynamic height of the listbox?

  • Thread starter Thread starter sgrm123
  • Start date Start date
S

sgrm123

Guest
Hi,

In MFC need to set dynamic height for the listbox based on number items.

I am using below code for setting height

int Height= m_ctrlListBox.GetItemHeight(0) * nItemsCount;

The items are not fitting in the listbox.

How to set correct height to listbox considering font?

I am using the style LBS_NOINTEGRALHEIGHT.

Continue reading...
 
Back
Top