Reputation: 5640
I want to change the size of the tabs.
We have added a closing cross to our tabs, but it conflicts spaciously with the text of the tab.
So far I have realized the following:
GetItemRect(int i, RECT* rc)
gives me the rect. What I really would like is a SetItemRect.SetItem
cannot be used as the item does not contain its size. It is calculated based upon the contents I give it.SetSize
is supposed to set the size of a tab (all tabs?). But I cannot find out where to put it that does not trigger a redraw, which sparks an infinite loop if I put it with the WM_PAINT case.This is where I custom draw the contents of the tab, but I cannot resize them here:
LRESULT CSkinnedTabCtrl::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message) {
case WM_PAINT: {
...
CPaintDC dc(this);
INT nCount = GetItemCount();
for (INT i = 0; i < nCount; i++) {
CRect rc;
GetItemRect(i, rc);
DrawItem(dc, i, rc);
}
return TRUE;
}
Where do I set the size of the tabs, and how?
Upvotes: 2
Views: 769