hi guys,
was tinkering around with the tab control and came up with a problem. for your information, i have relied heavily on the example shown here:
http://www.codeproject.com/KB/tabs/firefoxtabcontrol.aspx
basically what i'm doing is docking forms onto different tab pages.
my problem is that after i override OnDrawItem, the xp stlye is replaced with a pretty ugly control style.
i encountered my first problem when i wanted to add icons to the tabpages, as seen in the example provided in the link, OnDrawItem wipes the slate clean, so even if i assign an image key to the particular tab, it would not display the image (note that when i open different forms, the icons displayed should be different). my solution was moving the OnDrawItem event from the control itself onto the main form thus allowing me to manually draw the icons based on the forms selected.
my questions are:
1. is there a way to pass variables into the control's OnDrawItem(i don't think moving the code into the main form is a good thing to do and since its an event, i don't know how i can pass in variables)? OR is there a way to still enable the image key to display the icon even after using OnDrawItem?
2. obviously i would want the xp style to remain on the tabs (plus the close button and corresponding icon), but i really don't want to redraw and repaint everything from scratch. if i want the style, i'd have to set the Draw mode to OwnerDrawFixed but if i do that, i won't be able to display the close boxes when i add new tabs since the main point of using OnDrawItem is to display the close boxes WHEN the tabpages are drawn, removing it would mean an empty tab with no icon.
really hope you guys can help me. i'm pulling off my hair now.
regards.