FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Menu Font
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Menu Font
Posted: Wed Nov 28, 2012 08: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
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Menu Font
Posted: Fri Nov 30, 2012 09: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
Posts: 169
Joined: Mon Feb 25, 2008 02:42 AM
Re: Menu Font
Posted: Sat Dec 01, 2012 01:14 AM
Hi !
I don't know how to use it with FWH

Code (fw): Select all Collapse
#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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Menu Font
Posted: 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
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Menu Font
Posted: Tue Dec 04, 2012 07: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

Continue the discussion