Questions tagged [ownerdrawn]

This allows the user to custom draw controls at run time in the Win32 Api. Any existing control can have its appearance altered through the paint message. This is C, C++,C# and Delphi applicable.

When you are changing the appearance of most any Win32 controls, you specify the _OWNERDRAW flag. This will then allow you to intercept the paint messages of desired control.

184 questions
0
votes
2 answers

GetMenuItemInfo does not set fType with MIIM_TYPE

I have been working with winapi just a little bit, making a project with owner draw on menus. When I called GetMenuItemInfo, it sets the text of the menu item, but not the fType UINT variable flags. Currently I have declared: MenuItem->fMask =…
Spamdark
  • 1,341
  • 2
  • 19
  • 38
0
votes
1 answer

WinApi: How to add alternative text to owner-drawn button for screen readers?

I've created an application (C++, pure Win32, no ATL/MFC) which has a window with two buttons. These are owner-drawn buttons, children of the window itself, and I create them using CreateWindowEx with a BS_OWNERDRAW style. I'm doing accessibility…
BeneGal
  • 180
  • 1
  • 11
0
votes
1 answer

OwnerDraw DrawItem event on my combobox also changes the Text property value

My question is basically, does implementing DrawItem for my ComboBox in WinForms, change my Text property, why and I can I stop it? Because my OwnerDraw event works perfectly except the Text property "also" gets set to the same logic as all the…
PandaWood
  • 8,086
  • 9
  • 49
  • 54
0
votes
0 answers

ListView OwnerDraw artifacting when using LargeIcon view

I have a ListView in a C# WinForms project with OwnerDraw set to true. I'm populating both LargeIcon and List views, as well as the LargeImageList and SmallImageList properties (both of which have only a single image as all items display the same…
Michael Itzoe
  • 1,949
  • 4
  • 29
  • 49
0
votes
0 answers

Is it possible to remove the dotted rectangle and visual style on the selected tab in TabControl?

I am having a problem on my extendedtabcontol class, I cannot get rid of the dotted box or the visual style box on the selected tab. I have my own DrawItem (see below), I have overridden several methods from the tabcontrol and I have even overridden…
Adrian
  • 1
0
votes
3 answers

Label UserPaint drawn text doesn't fit

I have a custom Label class, drawn text doesn't fits. What am I doing wrong here? class MyLabel: Label { public MyLabel() { SetStyle(ControlStyles.SupportsTransparentBackColor | ControlStyles.UserPaint, true); } protected…
Sinatr
  • 20,892
  • 15
  • 90
  • 319
0
votes
1 answer

c# MeasureItemEvent handler: e.ItemHeight not changing

Is it me or can I only set the itemheight - e.ItemHeight - once for a listbox? Although I handle the MeasureItemEvent on my ownerdrawn listbox and set the e.ItemHeight to the right value, only the first height that is set will be used. Oops, I am…
0
votes
1 answer

What is an owner drawn listbox?

Please excuse my ignorance, but I have come across this term "owner drawn" listbox. Can someone experienced with this explain what exactly that is?
7wp
  • 12,505
  • 20
  • 77
  • 103
0
votes
1 answer

What's the correct way to use controls in Owner drawn list box?

I am experimenting with owner drawn list box. I am adding a text box to a specific item within list box. However, when I start scrolling, the text box does not display in the right location. What is the right way to do this? Here's the code I am…
Chetan
  • 184
  • 12
0
votes
3 answers

The class CheckComboBox can be designed, but is not the first class in the file.

i am developing a winform application which has an owner drawn combobox with check boxes. but in visual studio i am facing following erroe " The class CheckComboBox can be designed, but is not the first class in the file. Visual Studio requires…
Iorn Man
  • 267
  • 8
  • 21
0
votes
1 answer

listbox control ownerdraw question( adding a edit control to the listbox item )

I am using owner draw variable style for a listbox( winforms 2.0) when a user selects an items I want to draw an edit control in that cell Is that doable not a drop down but an actual edit control appearing in the cell or item as it were how thanks
Rahul
  • 2,194
  • 4
  • 31
  • 46
0
votes
1 answer

Redrawing of owner-drawn winforms combobox items

I need to show items in a combobox with a different background color. I also want to change what that color is depending on if the item is selected (or the mouse is on top of it), just the same way it works when a combobox is not owner-drawn. It is…
Jimmy
  • 5,131
  • 9
  • 55
  • 81
0
votes
2 answers

OwnerDrawn Window

i'm not being succefull on drawing my own listbox, heres the code: LRESULT CALLBACK ListBoxProcedure(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch (msg) { case WM_DRAWITEM: …
0
votes
1 answer

WinApi owner CComboBox edit window, edit window inside CComboBox

I have a question if is there a possibility to owner CComboBox edit window(top most window of CComboBox/edit window inside a ComboBox) Because i have made that a CComboBox is OWNERDRAW and I can draw on items( via DrawItem() method) I also would…
0
votes
2 answers

limit of 64 ownerdraw createwindow buttons

I want to create an array of 256 colored buttons with the owner draw extended style to a dialog box created with the visual studio dialog design tool. I added a loop to the WM_INITDIALOG message handler in the dialog procedure to do this: for (i=0;…
Mike Dorl
1 2 3
12
13