Ribbon UI and Desktop Window Manager API on windows - winapi

I am trying to implement my own ribbon UI in native c++. How is this implemented on windows XP ?? Unfortunately I cannot use any of the available frameworks.
I have been able to get my app working on windows 7 following the sample shown at http://msdn.microsoft.com/en-us/library/windows/desktop/bb688195(v=VS.85).aspx
My app has buttons in the titlebar area on the top left corner and tabs integrated with glass/window background.This works for vista and 7 but not on XP. Is it possible to implement this on XP ??
Office 2010 seems to still have the same look sans the glass effect when i turn off the Aero theme on win7. How would i get this to happen in my app??
Thanks,
Abhinay

It is not possible to implement ribbon UI yourself on Windows XP since Windows XP does not contain an API for that purpose. Apart from that the ribbon UI internally uses the undocumented NetUI (the class name of the ribbon window is NetUIHWND).

Related

Create Windows app similar to Windows 7 Gadgets

I'm looking for an idea of how to develop a simple Windows application which will show an image (overlayed and always on top). An image should be clickable.
Similar to gadgets in Windows 7.
How to do it? Tnx.
To make the window overlay, use SetLayeredWindowAttributes
and to make it top most set the WS_EX_TOPMOST extended style at creation

Host Custom Controls using Windows Ribbon Framework

Does anybody know if it's possible to host custom controls within the Ribbon bar when using the native Windows Ribbon Framework (the one introduced with Windows 7, used in MS Paint / Wordpad for example, NOT the Office Ribbon Framework)?
I know of the available controls as listed at the following MSDN source but I'd like to know if it's possible to use my own controls too.
http://msdn.microsoft.com/en-us/library/dd940497(v=vs.85).aspx
From what I have experienced so far this is not possible. Neither got an answer here, nor in the Microsoft Partner forums.
Marking as solved.

XP-Styles not working for ListView or ComboBox in Windows XP

I am using a Manifest for XP Styles, so all my controls are using the new look. However if I run my program in Windows XP then my ListView controls are displaying with the old style flat headers. Also the HDS_NOSIZING style is not working for the headers. This seems to imply that XP is using the old Common Controls 5.0 version of the listview instead of 6.0.
I'm very confused about this whole thing. I read that Common Controls 6.00 ships with XP, so why can't I use the latest ListView with XP?
I read on another page that XP-Styles only work in XP for Common Controls 5.0 ListViews but not for 6.0. So if it is indeed using 5.0, then shouldn't it apply the new XP-Styles to listviews anyway?
Is it actually possible to use the Common Controls 6.0 version of some controls and the 5.0 version of others?
Also one other thing. In XP my ComboBox Drop-down lists appear like regular Combo boxes instead of like Buttons as they do in Win7. Is this normal?
Thanks for your help as I find this whole Common Controls 6.0 + XP Styles concept very confusing.
You are hoping to see Windows 7 styles back on Windows XP. That's not going to work. XP will show flat headers, HDS_NOSIZING is only supported in Vista and up. Similarly, combo boxes with the CBS_DROPDOWNLIST only appear as buttons in Vista and up.
In all likelihood, your program is working exactly as it should and is displaying proper XP styles. You can double-check with a debugger. Debug + Windows + Modules and look at the version number of the loaded comctl32.dll

Guide.BeginShowKeyboardInput and tap to correct bar?

With XNA and Windows Phone, using Guide.BeginShowKeyboardInput doesn't seem to use the native "tap to correct words" bar.
Is there any way to get it to show up, or is it a current XNA 4.0 limitation on Windows Phone?
From this article:
If your application requires keyboard support, then you should consider Silverlight. Silverlight applications get access to the software keyboard by default, but for games made with XNA Game Studio, developers need to build their own software keyboard control to enable keyboard input.
With XNA, you can only use Guide.BeginShowKeyboardInput, and this doesn't have the functionality you desire.

Making a vb.net application blend in with the Windows theme

Previously I used to piddle around with VB6 to develop a couple of personal projects. Following my upgrade to Windows 7, I've decided to piddle about with vb.net Express Edition 2010.
If I wanted my VB6 application to blend in with the visual style of Windows, I would use the code and techniques described here. In short, I would use a Manifest file and a couple of calls within the application and most of the elements would look similar to the XP theme applied. If it was run on 2000, 95 or 98 then it would look like a standard Windows app. All was good.
Now I've moved onto vb.net, I've written a simple "Hello, world" application but I have absolutely no idea on how to make it look like the Windows 7 theme (eg. the font matches the system font and the widgets are styled correctly).
Just changing the font is a hack and will look out of place on machines that are set-up differently or run a different version of Windows where the default font is different.
How do I ensure my application matches the applied Windows theme irrespective of the version of Windows?
A lot of this is automatic if you create a Windows Forms app. They will (mostly) use the standard native Windows controls which draw themselves with the theme colors. But there are exceptions:
the Form item template uses a default Font named Microsoft Sans Serif. You'll have to change it to Segoe UI to match the Vista/Win7 default. This is only necessary for the Form class, all controls you put on it will automatically inherit that font. On an XP machine, the Windows font mapper will notice that the font is missing and automatically fall back to MSS.
the MenuStrip class uses custom rendering to draw the menu items. It tries to match the Windows style when you change the RenderMode property to System but the way it draws doesn't match the Win7 style. Right-click the toolbox, Choose Items and select MainMenu. That's a legacy version that does use Windows to draw menus so it produces the proper theme appearance.
A very similar problem for ToolStrip. It's legacy version is ToolBar. This is a hard one to swallow, it doesn't use a rebar which make the tool bar look flat and ugly.
There are similar problems in WPF but with the added problem that WPF doesn't use any of the standard Windows controls. And gets it wrong in subtle places.

Resources