Windows Ribbon Framework: How to change font face and size?

后端 未结 3 1324
情话喂你
情话喂你 2021-02-14 16:07

How do you change the font face and font size used by the Windows Ribbon Framwork\'s UIRibbon?

The font used by the ribbon does not match the font the user has chosen as

3条回答
  •  轮回少年
    2021-02-14 16:24

    I'm not exactly sure.. You're using the Windows Ribbon Framework in Delphi and got this strange behavior?

    I've just started playing with the Framework but the Ribbon respects my preferences.

    TUIApp = class(TInterfacedObject, IUIApplication)
    ...
    gApp: TUIApp;
    uiFrame: IUIFramework;
    ...
      CoCreateInstance(CLSID_UIRibbonFramework, nil, CLSCTX_INPROC_SERVER, IUIFramework, uiFrame);
    
      if Succeeded(uiFrame.Initialize(Handle, gApp)) then
      begin
         if not Succeeded(uiFrame.LoadUI(GetModuleHandle(nil), PChar('SIMPLERIBBON_RIBBON')))then
            sleep(5);
      end;
    

    This is all what i do in my test project.

    With 9pt: alt text

    And with 14pt: alt text

    Perhaps you change the wrong option? I've set the font size of the "Menu" element.

    If you have further questions just ask...


    I've just checked Win7 Paint. It does respect the user preferences. Therefore i guess you did something wrong or really changed the wrong option.


    As requested the screenshot: alt text

    It looks likes we did the same. This is pretty strange...

提交回复
热议问题