View Full Version : SEC3DTabWnd no resizing Label

08-22-2008, 01:09 AM
Hi all, I found this problem in SEC3DTabWnd.
In many cases I want a tab with only an Icon, no Text.
I Add the Tab, then using the

SetTabIcon ( int nIndex, UINT nIDIcon, int cx, int cy)

function I set the right icon.
But the label result too short, and the icon is larger than the label.
I found dthat this function call the same function of SEC3DTabControl.
This function, unlike the similar

SetTabIcon ( int nIndex, LPCTSTR lpszIconName, int cx, int cy)

don't recall the base function

SetTabIcon ( int nIndex, HICON hIcon)

that contain the RecalcLayout, but execute same code of base function except the RecalcLayout function.
I don't know if this difference is a mistake or not, for now I've fixed it for me.



08-22-2008, 03:27 AM
Anthoer bug, on similar situation:
normal SEC3DtabWnd, I add my tabs, but until I click on one tab, the last tab has "zero" dimension (only 12 px padding). This is because calling the AddTab of SEC3DTabControl, this function call the same function of base class ( SECTabControlBase).
Added the Tab, the base class call RecalcLayout, but in SEC3DTabControl the RecalcLayout function calculate the extension of m_csLong, not m_csLabel.
At this time m_csLong is empty, because the AddTab of SEC3DTabControl hasn't still setted it. Final reslut is that the width of last label is at minimum.