Menu Font

Post Reply
User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Menu Font

Post by TimStone »

I have set the Main( ) window to "Segoe UI Boldface" and a -14 size font. This works well everywhere except the main menu.

I create oWnd, and then use oWnd:SetFont( oFont4 ) ( which is the Segoe font )

However, my menu displays in a much smaller font.

How can I increase the size of my menu display ? I have looked through all the resources without success.

Tim
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Re: Menu Font

Post by TimStone »

Is there no answer to this question ?
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
User avatar
fafi
Posts: 169
Joined: Mon Feb 25, 2008 2:42 am

Re: Menu Font

Post by fafi »

Hi !
I don't know how to use it with FWH

Code: Select all

#include <windows.h>
#include "hbapi.h"
#include "hbapiitm.h"

#define HB_PARNL( n, x )   hb_parnl( n, x )
#define HB_ISLOG( n )      ISLOG( n )


static BOOL newStyle = TRUE;

typedef struct _MYMENUITEM
{
   UINT uiID;
   LPSTR caption;
   UINT cch;
   HBITMAP hBitmap;
   HFONT hFont;
   UINT uiItemType;
} MYMENUITEM;



HB_FUNC( MENUITEM_SETFONT )
{
   if( newStyle )
   {
      MENUITEMINFO MenuItemInfo;
      MYMENUITEM * pmyMenuItem;

      MenuItemInfo.cbSize = sizeof( MENUITEMINFO );
      MenuItemInfo.fMask = MIIM_DATA;
      GetMenuItemInfo( ( HMENU ) hb_parnl( 1 ), hb_parni( 2 ), FALSE, &MenuItemInfo );

      pmyMenuItem = ( MYMENUITEM * ) MenuItemInfo.dwItemData;

      if( GetObjectType( ( HGDIOBJ ) hb_parnl( 3 ) ) == OBJ_FONT )
      {
         if( pmyMenuItem->hFont != NULL )
            DeleteObject( pmyMenuItem->hFont );

         pmyMenuItem->hFont = ( HFONT ) hb_parnl( 3 );
      }
   }
}


 
Regards
Fafi
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Menu Font

Post by Antonio Linares »

Tim,

Windows lets you change the font to use in all the menus (at least it used to be possible, not sure about Win8) but not to change it specifically for an app.

As FiveWin allows owner draw menus, we could look for a way to implement it for just an app, but I don't remember (right now) to have done it before
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Re: Menu Font

Post by TimStone »

Antonio,

I didn't even look closely at that. Yes, Menu fonts can be set in the Windows setup in 8. Done ... all OK now.

Thanks
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
Post Reply