Menue

Menue

Postby byte-one » Sun Apr 16, 2017 4:09 pm

Image
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.
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: Menue

Postby cnavarro » Mon Apr 17, 2017 12:22 am

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 view


#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

//----------------------------------------------------------------------------//

 


Image
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6548
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Menue

Postby byte-one » Mon Apr 17, 2017 9:19 am

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 view
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:

Image
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: Menue

Postby cnavarro » Mon Apr 17, 2017 11:23 am

Please try with

Code: Select all  Expand view

MENU oMenu 2013 FONT oFont_daten COLORMENU MENUCOLOR1, MENUCOLOR2 COLORSEPARATOR MENUCOLOR3 COLORSELECT MENUCOLOR1,MENUCOLOR2,MENUCOLOR1 COLORLEFT MENUCOLOR2 COLORRIGHT MENUCOLOR1 NOBORDER ADJUST
 
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6548
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Menue

Postby byte-one » Mon Apr 17, 2017 11:44 am

Sorry, the same!
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: Menue

Postby cnavarro » Mon Apr 17, 2017 11:48 am

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
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6548
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Menue

Postby byte-one » Mon Apr 17, 2017 12:15 pm

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!
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: Menue

Postby cnavarro » Mon Apr 17, 2017 12:51 pm

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
Image

With 26 x 26
Image

I'm going to look for a solution in your version
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6548
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Menue

Postby byte-one » Mon Apr 17, 2017 3:32 pm

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__ *)
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: Menue

Postby cnavarro » Mon Apr 17, 2017 6:08 pm

You must calculate the error-linenumber -9 as i compile with #pragma begindump!


I do not understand
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6548
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Menue

Postby byte-one » Mon Apr 17, 2017 6:27 pm

Cristobal, you must in the error-linenumbers given zB. "menudraw.prg 1699" subtract 9 as i compile in ananother way!
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: Menue

Postby byte-one » Mon Apr 17, 2017 6:38 pm

Concret this 3 lines on different places are affected:
Code: Select all  Expand view
hOldFont = SelectObject( lpdis->hDC, hFont );


And the function "max" is undefined as it should be "Max"!!!
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 61 guests