ondrawitem

Vertical Text on Right-Aligned TabControl

Trying to have the text on each tab of the tabcontrol to be displayed vertically. Being that I've never forayed into controls and what not, i'm sorta stuck. Found some code to get the text to display as if it were rotated to the left. I would like it to display as if it were rotated right (vertically) on the tab. The skeleton code is ...

ListBoxItem words drawing help

Hi Guys, i am re-drawing the listitem text in DrawItem to make a single word bold. so far no luck. can anyone tell me how to do this please? would be a great help. thanks string[] lines = Regex.Split("Some text message here", @"\W+"); foreach (string word in lines) { Font font = e.Font; if(word = "text") font = new Font(e.Font,...

Overriding DrawItem for ListBox - unselected items are not redrawn

This is a C# desktop application. The DrawStyle property of my ListBox is set to OwnerDrawFixed. The problem: I override DrawItem to draw text in different fonts, and it works. But when I start resizing the form at the runtime, the selected item is drawn correctly, but the rest of them are not redrawn, causing text looking corrupt for u...

Why the DrawItem method of my owner draw listbox can't be called

I try to write a owner draw listbox with WTL. My code looks like this template class ATL_NO_VTABLE CMyListBoxImpl : public CWindowImpl, public COwnerDraw { ... BEGIN_MSG_MAP(CMyListBoxImpl) MESSAGE_HANDLER(WM_CREATE, OnCreate) MESSAGE_HANDLER(WM_DESTROY, OnDestroy) MESSAGE_HANDLER(WM_ERASEBKGND, OnEraseBackground) ...