Help: How to autofit CListCtrl's background?
-
-
My dialog is resizable with a list control, and the list control's rect is the whole of dialog's client rect, call CListCtrl::SetBkImage to enable background. My question is how to autofit(stretch) background with the dialog when resizing? Thanks.
What if your try call ::SetBkImage again when the OnSize member is triggered ?
Easy Profiler : Now open source ! http://www.codeproject.com/KB/cpp/easyprofiler.aspx
-
What if your try call ::SetBkImage again when the OnSize member is triggered ?
Easy Profiler : Now open source ! http://www.codeproject.com/KB/cpp/easyprofiler.aspx
void CMyDlg::OnSize(UINT nType, int cx, int cy) { CDialog::OnSize(nType, cx, cy); // TODO: Add your message handler code here if (IsWindow(m_ListCtrl.m_hWnd)) { CRect rect; GetClientRect(rect); m_ListCtrl.MoveWindow(rect); m_ListCtrl.SetBkImage(::LoadBitmap(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDB_BKIMAGE))); } } problem still unresolved, autofit(stretch) no effect! Thanks!