开发者

Can I use the Windows Ribbon UI on Windows XP? how?

开发者 https://www.devze.com 2023-02-28 14:01 出处:网络
I understand from reading Arik Poznanski\'s blog that the Wi开发者_开发知识库ndows Ribbon UI Framework is a COM object in Windows 7, and the WindowsRibbon wrapper is just a .NET veneer around that, to

I understand from reading Arik Poznanski's blog that the Wi开发者_开发知识库ndows Ribbon UI Framework is a COM object in Windows 7, and the WindowsRibbon wrapper is just a .NET veneer around that, to allow the Ribbon UI to be used in Windows Forms applications.

I've been successful in implementing a Hello World Windows Form app that employs this wrapper:

Can I use the Windows Ribbon UI on Windows XP? how?

It is running on my development machine, which is Windows7.


Questions:

  • Will this "hello, world" application run on Vista? XP? Do I need to download something onto those machines in order to make that happen?

  • Is there a way to specify the Windows Ribbon UI components as a pre-requisite, in an MSI installer?

Thanks


Browsing around I found the documentation for UIRibbon.dll, which is the DLL on Windows7 that delivers the Ribbon UI. It lists these as minimum supported clients:

Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista

how would I check for that in an MSI ?


Best I can tell, you are taking on a dependency that won't work on Windows XP. This doesn't seem to be a redistributable component ( although I will admit hacking on a VM trying to see if I could transplant it into an XP machine ).

Since it isn't redistributable, I'm not sure there's any point in doing a search in MSI as you can just rely on checking the OS Major version ( Win7 ).


You are free to use a Ribbon UI wherever you like (subject to the Ribbon license agreement; which basically asks that you don't make a half-assed version).

There are companies that created their own Ribbon controls. Some of those implementations (i.e. Microsoft's Windows Ribbon Framework) only work on Windows 7 or Windows Vista (with a download installed first).


If you want to check that the Windows Ribbon Framework is available on the client machine, try to create a UIRibbonFramework object:

IUIFramework* pFramework = NULL;
HRESULT hr = ::CoCreateInstance(
            CLSID_UIRibbonFramework, 
            NULL,
            CLSCTX_INPROC_SERVER, 
            IID_PPV_ARGS(&pFramework));
if (FAILED(hr))
{
  //Ribbon not available - fallback to something else
  return;
}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号