Menu Font

Menu Font

Postby TimStone » Wed Nov 28, 2012 8:23 pm

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
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Menu Font

Postby TimStone » Fri Nov 30, 2012 9:17 pm

Is there no answer to this question ?
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Menu Font

Postby fafi » Sat Dec 01, 2012 1:14 am

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

Code: Select all  Expand view

#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
fafi
 
Posts: 169
Joined: Mon Feb 25, 2008 2:42 am

Re: Menu Font

Postby Antonio Linares » Sat Dec 01, 2012 11:52 am

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
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Menu Font

Postby TimStone » Tue Dec 04, 2012 7:18 pm

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
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 117 guests