Questions tagged [uxtheme]

35 questions
22
votes
6 answers

How do I give the RichTextBox a flat look?

I'm working on a WinForms SmartClient application, which uses a lot of RichTextBox controls - some in place of the regular TextBox for various reasons. Unfortunately the RichTextBox draws the ugly Win95 3D border instead of the themed XP or Vista…
grover
  • 2,265
  • 1
  • 16
  • 15
11
votes
2 answers

What Uxtheme function I must use to get the default size of the minimize, Maximize and close buttons?

I'm using the DrawThemeBackground function to draw some system elements on a canvas, And I need draw the title buttons of a form, the only part that i missed is how i can get the default sizes of the title buttons. Exist any Uxtheme function to get…
Salvador
  • 16,132
  • 33
  • 143
  • 245
7
votes
1 answer

How to change theme DrawThemeTextEx font color?

i am using DrawThemeTextEx to draw text. i am trying to draw it in a particular color using the crText COLORREF member of DTTOPS structure: procedure DrawThemeText(dc: HDC; text: WideString; font: TFont; pt: TPoint; foreColor: COLORREF); var R:…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
7
votes
4 answers

How to get size and position of window caption buttons (minimise, restore, close)

Is there an API call to determine the size and position of window caption buttons? I'm trying to draw vista-style caption buttons onto an owner drawn window. I'm dealing with c/c++/mfc. Edit: Does anyone have a code example to draw the close button?
Mark Ingram
  • 71,849
  • 51
  • 176
  • 230
5
votes
3 answers

How to change my treeView icons insted of +,- like a windows explorer treeview in c#.net win forms

How can I change the expand/collapse images from the plus ( + ) and minus ( - ) images that appear when ShowPlusMinus and/or ShowRootLines are true. To help visualize, I would like to make the following TreeView Look like this (like Windows…
user1858718
  • 137
  • 2
  • 3
  • 12
4
votes
3 answers

How to parse an .msstyles file?

I need to extract some bitmaps from an .msstyles file (the Windows XP visual style files) and I'm not sure where to start. I can't seem to find any documentation on how to do it, and the file format seems to be binary and not easily parsed. I have…
Jon Tackabury
  • 47,710
  • 52
  • 130
  • 168
4
votes
0 answers

DPI awareness: could I be told when I need to recalculate my text height so I don't have to do it all the time? And SM_CYSMICON/checkbox heights too?

A frequent operation in my Windows Table control, which I am reworking and moving into a DLL, is to get the height of a row. This is the maximum of the height of text in the current font, in pixels the current small icon height, in pixels…
andlabs
  • 11,290
  • 1
  • 31
  • 52
4
votes
2 answers

How to draw the element part in right to left (RTL) direction when drawing with DrawThemeBackground?

I'm trying to draw the ttGlyphClosed element of Explorer::Treeview class in right to left direction (like when the BiDiMode would be bdLeftToRight). I have a problem, that I don't know how to make my offscreen bitmap to be transparent. The bitmap's…
DmitryB
  • 455
  • 1
  • 5
  • 18
3
votes
0 answers

ListView with Windows 7 column header style

Possible Duplicate: NetUIHWND and DirectUIHWND I've seen that Windows 7 introduced a new listview style which even differs from the Windows Vista one. Columns have a fade-to-white and animate while reordering them. In Windows Vista the columns…
Ray
  • 7,940
  • 7
  • 58
  • 90
3
votes
2 answers

UXTheme: Draw Combobox Chevron Without Border

I'm trying to draw a custom control that should use the "combobox" theme class. Using m_hTheme = OpenThemeData(m_hWnd, _T("COMBOBOX")); auto stateBG = ...; // depends on window state DrawThemeBackground(m_hTheme, ps.hdc, CP_READONLY, stateBG,…
peterchen
  • 40,917
  • 20
  • 104
  • 186
3
votes
1 answer

Why is my window losing its HTMEME when I call SetWindowLongPtr(GWL_STYLE) on it?

I'm coding a custom Win32 UI control that I want to incorporate visual themes in. I load themes in its WM_NCCREATE as such: case WM_NCCREATE: { HTHEME hTheme = ::OpenThemeData(hWnd, L"EDIT"); assert(hTheme); assert(::GetWindowTheme(hWnd)…
c00000fd
  • 20,994
  • 29
  • 177
  • 400
2
votes
1 answer

How to fix a delayed declaration in UxTheme

In Delphi XE UxTheme unit there is the following declaration function DrawThemeTextEx(hTheme: HTHEME; hdc: HDC; iPartId: Integer; iStateId: Integer; pszText: LPCWSTR; cchText: Integer; dwTextFlags: DWORD; pRect: PRect; var pOptions: TDTTOpts):…
Gad D Lord
  • 6,620
  • 12
  • 60
  • 106
2
votes
0 answers

Turning Explorer Visual Style on and off does not restore ListView look

Because I don't like the way the ListView looks with the Explorer theme combined with grid-lines in report view I want to turn the theme off when grid-lines are on. The problem is that once the Explorer theme has been applied it is not possible to…
Anders
  • 97,548
  • 12
  • 110
  • 164
2
votes
1 answer

Is there a component that behaves like a TBitBtn that is properly themed?

Is anyone aware of an existing Delphi component, that is properly themed like a TButton (has a fade in/fade out effect upon mouse hover in Windows 7 and above) supports Glyphs like TBitBtn but WITHOUT using ImageLists (the same way TBitBtn…
Steve
  • 2,510
  • 4
  • 34
  • 53
2
votes
2 answers

Enabling XP visual themes / visual styles kills performance

While trying to modernize the appearance of an old C++Builder / Delphi application, I enabled visual themes (visual styles) and was surprised at just how much of a performance hit themes added. For example, for our primary setup page (an 11-tab,…
Josh Kelley
  • 56,064
  • 19
  • 146
  • 246
1
2 3