OK, briefly this is what you have to do. Not compleate as I am pressed for time (Friday afternoon and all that)
the msg you will have to deal with to repaint the TAB ctrl is
Code:
case WM_DRAWITEM:
pDrawItem = (DRAWITEMSTRUCT *)lParam;
if(pDrawItem->hwndItem==hWndTAB_Ctrl)
{
//process the paint msg
}
//To paint the tabs white with black border
HBRUSH hWhite=NULL,hBlack=NULL;
hWhite=GetStockObject(WHITE_BRUSH);//get a white brush to draw with
hBlack=GetStockObject(BLACK_BRUSH);
FillRect(pDrawItem->hDC,&(pDrawItem->rcItem),hWhite);//paint the area white
FrameRect(pDrawItem->hDC,&(pDrawItem->rcItem), hBlack);//draw a black frame around tab
//don't have to delete stock objects but it does not harm and GDI resources must be released
DeleteObject(hWhite);
DeleteObject(hBlack);
//text
//get the text on the tab
//this will be a macro, you can find this and store the string in sBuffer
//then use this to determine its actual length so you can see if it fits, center it ect.
GetTextExtentPoint32(pDrawItem->hDC, sBuffer, lstrlen(sBuffer), &Size);
//Size.cx and Size.cy now contain the 'size' of the string
//find the center start= (total_width-string_width)/2
xStart=(int)((pDrawItem->rcItem.right-pDrawItem->rcItem.left)-Size.cx)/2;
TextOut(pDrawItem->hDC, xStart, pDrawItem->rcItem.top, sBuffer, lstrlen(sBuffer));