Questions tagged [visual-styles]

Microsoft visual styles is a user interface customization (themes) technology introduced in Windows XP and substantially expanded in Windows Vista to cover common Windows controls. Since Windows 8 visual styles can't be turned off.

Useful resources:

75 questions
31
votes
3 answers

Programming In C + Win API: How To Get Windows 7 Look For Controls?

I am programming strictly in C and WinAPI, no C++ or C#. I am a beginner and just learning to draw controls etc. The thing is that when I create Windows or other controls like Command Buttons, they have Windows Native look. Take a look at this: But…
Ishan Sharma
  • 700
  • 2
  • 10
  • 19
17
votes
3 answers

How to enable visual styles without a manifest

According to the docs: "If you want your application to use ComCtl32.dll version 6, you must add an application manifest or compiler directive to specify that version 6 should be used if it is available." Notice the logical OR above? So what is this…
Tergiver
  • 14,171
  • 3
  • 41
  • 68
14
votes
2 answers

Border Color of Controls Using VisualStyles

Microsoft's visual styles for winforms have always befuddled me. I am trying to have a Panel sit next to a TreeView and just have the same VisualStyle border. As you can see, the TreeView border is different than my drawing attempts in my Panel. …
LarsTech
  • 80,625
  • 14
  • 153
  • 225
7
votes
1 answer

How to use .NET TextBoxRenderer with TextBoxState.Hot to draw a hot text box?

i am trying to use TextBoxRenderer to render a "hot" text box: TextBoxRenderer.DrawTextBox(e.Graphics, rectangle, TextBoxState.Hot); except that it doesn't work, it doesn't render the text box as hot. TextBoxState.Selected doesn't render as…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
7
votes
1 answer

TSaveDialog fails with client visual styles disabled

I am trying to use a TSaveDialog in Delphi XE6: if not SaveDialog1.Execute(0) then Exit; The call immediately returns false, without displaying any dialog. I traced it down to the act of creating the shell Save Dialog COM object: function…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
6
votes
1 answer

visual styles independent drawing

Using C# winforms, i want to create custom controls that looks like the real ones. There are a lot of classes that can be used to draw controls that looks like the real ones: ControlPaint, VisualStyleRenderer, ButtonRenderer, CheckBoxRenderer,…
DxCK
  • 4,402
  • 7
  • 50
  • 89
6
votes
1 answer

Common controls are not properly painted when I resize window

INTRODUCTION: I am creating tab control with child dialog boxes as pages. I have Visual Styles enabled via #pragma comment. I have also called InitCommonControlsEx and #pragma comment( lib, "comctl32.lib" ) as well. Initially, when window loads,…
AlwaysLearningNewStuff
  • 2,939
  • 3
  • 31
  • 84
6
votes
2 answers

TabRenderer with no visual styles enabled?

I want to draw a custom TabControl with custom functionality. To do this, i inherited the Panel class and overrided OnPaint method to draw with TabRenderer class. The problem is that TabRenderer working only when visual styles enabled (can be…
DxCK
  • 4,402
  • 7
  • 50
  • 89
6
votes
1 answer

Win32. Enable visual styles in dll

I've got no experience in C++ and Win API so sorry if this question is nooby. I've got DLL where I create some components, MessageBox for example. I added pragma comment to enable visual styles and it does not work (and it shouldn't as I know from…
Moses
  • 1,243
  • 3
  • 14
  • 21
4
votes
1 answer

How to create a Flat Button in WinAPI with visual style

I wanted to create a flat image push button like the Windows 7 mute button. Here's the picture: flat button When mouse hover it(display border): flat button hover I tried to use BS_FLAT style, but nothing changed. My code is using visual style.…
thenick
  • 55
  • 2
  • 5
4
votes
2 answers

How do I draw a 3D border using visual styles?

I can draw a 3D border using ControlPaint.DrawBorder3D, but I get the 'Windows Classic' 3D border. I want to draw the current theme's 3D border - in the default XP theme, this is a 1px blue or gray border. How do I draw that, and how do I get its…
Simon
  • 25,468
  • 44
  • 152
  • 266
4
votes
0 answers

Extra 1-pixel margin around push button drawn with Windows visual styles

One of our legacy project uses API calls to draw custom controls using the current visual style of the OS (some code can be found in this question I asked). We detected that the classic push button is drawn with a 1-pixel indent instead of occupying…
TecMan
  • 2,743
  • 2
  • 30
  • 64
4
votes
2 answers

Apply a custom Visual Style (.msstyle) to a single Winforms app

Is there any way to apply a custom Visual Style (.msstyle) to a Windows Forms application without changing the theme of the entire system? Basically we want our application to maintain the same theme regardless of what has been set in Control Panel.…
luksan
  • 7,661
  • 3
  • 36
  • 38
4
votes
0 answers

How to draw a frame the same as a System.Windows.Forms.TextBox

In WinForms how do I draw a frame the same as in a System.Windows.Forms.TextBox control? I tried to use VisualStyleRenderer with the VisualStyleElement.TextBox.TextEdit.Normal parameter but it draws a strange gray…
DmitryB
  • 455
  • 1
  • 5
  • 18
4
votes
2 answers

How to change the control themes in a Win32 API application?

If I create a button in the Win32 API, the default conrol theme looks like a Windows 95/98 button. I remember in the past the Microsoft forums told me how to get the XP style, but I don't recall how to do this. Is there a way to programatically or…
Phil
  • 607
  • 1
  • 8
  • 22
1
2 3 4 5