I got an instance of MYListCtrl which is derived class from the CListCtrl
within CTabCtrl
instance.
I have implemented onSize
method for MYCListCtrl, and mapped it to the WM_SIZE
message.
I want to change size of MYListCtrl when window which includes CTabCtrl is resized, resizing should be based on the dimensions of CTabCtrl. How can I notify MYListCtrl what resizing is needed?
You need to implement onsize for the parent, i.e. the tab control. When the tab control.onresize is called it should in turn resize the list control. With setwindopos you can resize your list control. Something like this:
void MyTabControl::OnSize(UINT nType, int cx, int cy)
{
m_ListControl.SetWindowPos(/*various parameters */);
}