1

I am having a problem with the size of the CListBox that is suppose to cover all the client area of the SDi application.

My Main Window looks as shown below:

picture

As you can clearly see that the list box does not cover the whole client area. The following is what I am doing in on size of the CWnd derived class:

void CLogWnd::OnSize(UINT nType, int cx, int cy)
{
    CWnd::OnSize(nType, cx, cy);

    m_pWndLogList->SetWindowPos(NULL, 0, 0, cx, cy, SWP_NOMOVE | SWP_NOZORDER);
}

CLogWnd is the main window that fill all the area of the CMainFrame.

Roger Rowland
  • 25,885
  • 11
  • 72
  • 113

1 Answers1

4

Give your listbox LBS_NOINTEGRALHEIGHT style. Without it, the box wants to have a height that's an exact multiple of a row height.

Igor Tandetnik
  • 50,461
  • 4
  • 56
  • 85