uxtheme

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

淺唱寂寞╮ 提交于 2020-01-01 07:09:23
问题 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 explorer) 回答1: Expanding on Ivan Ičin's solution : [DllImport("uxtheme.dll", ExactSpelling = true, CharSet = CharSet.Unicode)] private static extern int SetWindowTheme(IntPtr hwnd, string pszSubAppName, string pszSubIdList); public static void

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

别等时光非礼了梦想. 提交于 2019-12-21 05:11:25
问题 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? 回答1: I've found the function required to get the position of the buttons in vista: WM_GETTITLEBARINFOEX This link also shows the system metrics required to get all the spacing correct (shame it's not a full dialog picture though). This works

Can you turn off visual styles/theming for just a single windows control?

回眸只為那壹抹淺笑 提交于 2019-12-20 06:43:15
问题 My Windows Forms application uses the following standard line of code so that visual styles (theming) is enabled for the entire application... Application.EnableVisualStyles(); ...which works just fine, all the controls have a themed appearance instead of the flat battleship gray that you would get otherwise. But I need to turn off visual styles for just a single control instance. I cannot remove the above line because then I would lose theming from all the controls. Is it possible to remove

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

那年仲夏 提交于 2019-12-12 18:28:24
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . 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 does). If there is no such component available, would it be possible to

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

那年仲夏 提交于 2019-12-03 15:34:40
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 I've found the function required to get the position of the buttons in vista: WM_GETTITLEBARINFOEX This link also shows the system metrics required to get all the spacing correct (shame it's not a full dialog picture though). This works perfectly in Vista, and mostly in XP (in XP there is slightly too much of a gap between the buttons).

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

淺唱寂寞╮ 提交于 2019-11-30 03:10:58
问题 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 that info? 回答1: Looks like this is more difficult then it sounds. First there's GetThemeMetric or GetThemeInt. But you'll see a lot of references that these functions return a 0x8007490 , some "element not found" , when you try to retrieve