ownerdrawn

Why is my owner-drawn combobox shown empty?

I'm subclassing a WTL combobox and I'm owner-drawing the items of the combobox. The control has the attributes CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_OWNERDRAWVARIABLE and I'm using the mix-in class COwnerDraw to implement DrawItem() and MeasureItem(). When the drop down list is down, the items are drawn correctly. However when the drop...

Testing whether item is visible in virtual ListView

Hello, all! Here's my predicament: I'm using a ListView control in virtual and OwnerDraw mode to display a number of items. Is there a way to test whether a certain item is visible (within the client area of the control) without triggering a draw event or a RetrieveVirtualItem event? The problem is, I have a background thread that peri...

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 ...

Trouble with TreeView.DrawNode - OwnerDrawText

I have an app that is connected to a remote server and polling data when needed. It has a TreeView where the Nodes represent the objects that are available and the color of the text indicate whether the data has been loaded or not; gray-italicized indicates not loaded, black, regular text is loaded. Currently I have set the TreeView to...

Windows Forms ListView in Details Mode - How to Change Row Height in Owner Draw?

I've got a Windows Forms ListView control in details mode. There are multiple columns at play. I'm trying to use owner draw to place a particularly wide column "below" the others. So, instead of this: COLUMN1 COLUMN2 COLUMN3 COLUMNNNNNNNNNNNNNNNNNNN4 I'm trying to do this: COLUMN1 COLUMN2 COLUMN3 COLUMNNNNNNNNNNNNNNNNNNN4 I c...

C# ColumnHeader's free space background color.

Hey, I'm trying to draw custom ColumnHeaders in a FastObjectListView control. So far the code works, but the ColumnHeaders free space ( so the part that does not contain any column headers atm ) still draws as default. private void olvMain_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e) { e.Graphics...

.NET OwnerDraw ComboBox: Vista/7 themed DropDownList

I'm working on a custom ComboBox for a project, and have the basic painting working. One of the remaining things to do is make it look like the default ComboBox in Vista and 7, when the DropDownStyle is set to DropDownList (looks like a button instead of a regular ComboBox). I read much about VisualStyleRenderer, read ComboBox.cs and Co...

How do I make an custom drawn resizable container?

I have a WinForms gui application which has a number of areas to it which I'd like to custom-draw some graphics. These areas would contain controls and be resizeable. I'm currently thinking of inheriting from a TableLayoutPanel and handling onpaint messages. Does this sound like a good way to go or are there other/better options? ...

Making a winform form owner drawable

I have a form that I am attempting to override the WndProc subroutine on. I am using GetDCEx to get a DC handle to my form. According to Microsoft's documentation on using GetDCEx, my form must have the CS_OWNDC or the CS_PARENTDC flag set my window class in order to use GetDCEx. According to Spy++, my window does not have these class at...