Hi, David,
Hope you can check this issue, the chm for V8.8 has a function CDocker::GetDockWidth() .
but I can't call it by this statement: CDockGetDockFromID(ID_DOCK_MULTI)->GetDockWidth(), the compiler has error : error: 'class Win32xx::CDocker' has no member named GetDockWidth. By searching result 0 from the include folder for Win32++, it seems V8.8 don't has this function. Would you please help check?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, David,
Thank you very much, I want re-size columns of listview control inside a ctab. the OnSize may have assert , than I set a member bool variable in CDockList::OnInitialUpdate(), than do resize as follow: My question is do we have other more direct method than this ?
Yes you can handle the WM_SIZE message if you want the columns of the ListView to be resized when the ListView is resized.
It would be better to handle the WM_SIZE message for m_pViewList's class rather than in CDockList. That way you could do away with the tests for IsWindow and m_bInitialized.
Best regards,
David
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, David,
Hope you can check this issue, the chm for V8.8 has a function CDocker::GetDockWidth() .
but I can't call it by this statement: CDockGetDockFromID(ID_DOCK_MULTI)->GetDockWidth(), the compiler has error : error: 'class Win32xx::CDocker' has no member named GetDockWidth. By searching result 0 from the include folder for Win32++, it seems V8.8 don't has this function. Would you please help check?
Hi Erik,
Use GetDockSize instead of GetDockWidth.
I'll update the documentation in due course.
Best regards,
David
Hi, David,
Thank you very much, I want re-size columns of listview control inside a ctab. the OnSize may have assert , than I set a member bool variable in CDockList::OnInitialUpdate(), than do resize as follow: My question is do we have other more direct method than this ?
LRESULT CDockList::OnSize(UINT msg, WPARAM wparam, LPARAM lparam)
{
CDocker::OnSize( msg, wparam, lparam);
if(m_bInitialized && m_pViewlist->IsWindow())
{
CRect rect = GetWindowRect();
int width = rect.Width()/3;
/ int width = LOWORD( lparam ); /
m_pViewlist->SetColumnWidth(0, width);
m_pViewlist->SetColumnWidth(1, width);
m_pViewlist->SetColumnWidth(2, width);
}
Hi Erik
Yes you can handle the WM_SIZE message if you want the columns of the ListView to be resized when the ListView is resized.
It would be better to handle the WM_SIZE message for m_pViewList's class rather than in CDockList. That way you could do away with the tests for IsWindow and m_bInitialized.
Best regards,
David