Page 1 of 1
Menue
Posted: Sun Apr 16, 2017 4:09 pm
by byte-one

As you can see in picture, entrys without a picture have the original wide of the dark section anstead the much widest in the group. Also the separator is to long!
The pictures are 26x26 pixels.
Re: Menue
Posted: Mon Apr 17, 2017 12:22 am
by cnavarro
What version of Fwh use?
Please modify this sample with your menu definitions used in your program
Only clasusules definition, do not worry if you do not have these resources
Code: Select all | Expand
#include "FiveWin.ch"
#include "WColors.ch"
static oWnd
static oMruRCs
static oBar
static nBackColorA := 8215601
//----------------------------------------------------------------------------//
Function Main()
local nH := ScreenHeight()
local nW := ScreenWidth()
local cItemText := ""
FW_SetUnicode( .T. )
DEFINE WINDOW oWnd FROM 3, 6 TO 20, 70 ;
TITLE FWVERSION + " Resources Editor" ;
MENU BuildMenu() //MDI
ACTIVATE WINDOW oWnd MAXIMIZED
return nil
//----------------------------------------------------------------------------//
function BuildMenu()
local oMenu
MENU oMenu 2007
MENUITEM "&File"
MENU
MENUITEM "&New" RESOURCE "new2"
MENUITEM "&Open" RESOURCE "Open2"
MENUITEM "&Save as..."
SEPARATOR
MENUITEM "Recent files"
MENU
MRU oMruRCs ;
FILENAME ".\re.ini" ;
SECTION "Recent RC files" ;
ACTION MsgInfo( cMruItem ) ;
MESSAGE "Open this file" ;
SIZE 10
ENDMENU
SEPARATOR
MENUITEM "&Exit..." ACTION oWnd:End() RESOURCE "Exit2"
ENDMENU
MENUITEM "&Edit"
MENU
MENUITEM "Primero" FILE ".\FiveRes\test26\adddbf_26.png"
SEPARATOR
MENUITEM "Segundo"
SEPARATOR
MENUITEM "Tercero" FILE ".\FiveRes\test26\addprg_26.png"
ENDMENU
//oMenu:AddMDI()
oMenu:AddHelp( "FiveWin Resources Editor", "FiveTech 1993-2007" )
ENDMENU
return oMenu
//----------------------------------------------------------------------------//

Re: Menue
Posted: Mon Apr 17, 2017 9:19 am
by byte-one
I have FWH 16/6
I use this code as you say in the past, that style 2013 allows all modifications.
Code: Select all | Expand
MENU oMenu 2013 FONT oFont_daten COLORMENU MENUCOLOR1, MENUCOLOR2 HEIGHT 3 COLORSEPARATOR MENUCOLOR3 COLORSELECT MENUCOLOR1,MENUCOLOR2,MENUCOLOR1 COLORLEFT MENUCOLOR2 COLORRIGHT MENUCOLOR1 NOBORDER
I have also tested with 2007:

Re: Menue
Posted: Mon Apr 17, 2017 11:23 am
by cnavarro
Please try with
Code: Select all | Expand
MENU oMenu 2013 FONT oFont_daten COLORMENU MENUCOLOR1, MENUCOLOR2 COLORSEPARATOR MENUCOLOR3 COLORSELECT MENUCOLOR1,MENUCOLOR2,MENUCOLOR1 COLORLEFT MENUCOLOR2 COLORRIGHT MENUCOLOR1 NOBORDER ADJUST
Re: Menue
Posted: Mon Apr 17, 2017 11:44 am
by byte-one
Sorry, the same!
Re: Menue
Posted: Mon Apr 17, 2017 11:48 am
by cnavarro
Ok, please put #define colors that you use to reproduce your menu with the same look
Thanks
----------------------- Edited ---------------------
And try with clausule LEFTWIDTH
Although I will check why the menu looks like this
Re: Menue
Posted: Mon Apr 17, 2017 12:15 pm
by byte-one
This are my colors. But also with others the same!
#define MENUCOLOR1 CLR_WHITE
#define MENUCOLOR2 rgb(95,95,95)
#define MENUCOLOR3 METRO_ORANGE
LEFTWIDTH has only in top-level menu an affect!
Re: Menue
Posted: Mon Apr 17, 2017 12:51 pm
by cnavarro
byte-one wrote:LEFTWIDTH has only in top-level menu an affect!
Yes, but I wanted to check if that version worked the same
Now run OK
With 16 x 16

With 26 x 26

I'm going to look for a solution in your version
Re: Menue
Posted: Mon Apr 17, 2017 3:32 pm
by byte-one
Cristobal, some compiler Errors in menudraw.c:
You must calculate the error-linenumber -9 as i compile with #pragma begindump!
Warnung W8004 C:\\prg_allgemein\\menudraw.prg 1699: 'nPos' wurde ein Wert zugewiesen, der nie verwendet wird in Funktion FwSelectedItem(tagDRAWITEMSTRUCT *,HMENU__ *,int,long,int)
Warnung W8004 C:\\prg_allgemein\\menudraw.prg 1879: 'nPos' wurde ein Wert zugewiesen, der nie verwendet wird in Funktion FwNoSelectedItem(tagDRAWITEMSTRUCT *,HMENU__ *,int,long,int)
Warnung W8004 C:\\prg_allgemein\\menudraw.prg 2118: 'nTop' wurde ein Wert zugewiesen, der nie verwendet wird in Funktion FwBmpItem(tagDRAWITEMSTRUCT *,HMENU__ *,int,HBITMAP__ *,long,long,long,int,HPALETTE__ *)
Fehler E2034 C:\\prg_allgemein\\menudraw.prg 2191: Konvertierung von 'void *' nach 'HFONT__ *' nicht möglich in Funktion FwCharItem(tagDRAWITEMSTRUCT *,HMENU__ *,int,HFONT__ *,long,int,char *)
Fehler E2034 C:\\prg_allgemein\\menudraw.prg 2259: Konvertierung von 'void *' nach 'HFONT__ *' nicht möglich in Funktion FwPromptItem(tagDRAWITEMSTRUCT *,HMENU__ *,int,HFONT__ *,int,char *,unsigned short,int,long,int)
Fehler E2034 C:\\prg_allgemein\\menudraw.prg 2327: Konvertierung von 'void *' nach 'HFONT__ *' nicht möglich in Funktion FwSeparatorItem(tagDRAWITEMSTRUCT *,HMENU__ *,int,long,HFONT__ *,char *,unsigned short,int)
Fehler E2268 C:\\prg_allgemein\\menudraw.prg 2948: Aufruf der undefinierten Funktion 'max' in Funktion Bmp2Gray(HBITMAP__ *)
Re: Menue
Posted: Mon Apr 17, 2017 6:08 pm
by cnavarro
You must calculate the error-linenumber -9 as i compile with #pragma begindump!
I do not understand
Re: Menue
Posted: Mon Apr 17, 2017 6:27 pm
by byte-one
Cristobal, you must in the error-linenumbers given zB. "menudraw.prg 1699" subtract 9 as i compile in ananother way!
Re: Menue
Posted: Mon Apr 17, 2017 6:38 pm
by byte-one
Concret this 3 lines on different places are affected:
And the function "max" is undefined as it should be "Max"!!!