HBMK2 - Barra de estado y barra principal mas pequenas

Post Reply
Compuin
Posts: 1237
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada

HBMK2 - Barra de estado y barra principal mas pequenas

Post by Compuin »

Saludos maestro Linares,

Estoy utilizando el Hbmk2 como vsc2022 y el tutor04.prg como ejemplo pero esta creando el mismo con la barra de estado y la barra principal mas pequenas que lo normal. Como puedo corregir esto?

Code: Select all | Expand

-gui

-Ic:\fwh\include

tutor04.prg

-Lc:\fwh\lib

-lFiveH32
-lFiveHC32

-lgdiplus
-lole32
-lOleDlg
-lversion

xhb.hbc
hbct.hbc
hbwin.hbc
hbmzip.hbc
hbziparc.hbc
hbfoxpro.hbc

-ldflag=/NODEFAULTLIB:msvcrt

tutor04.rc

Code: Select all | Expand

// We are going to build a PullDown menu and we are going to assign it
// to our main Window

// This example is the typical way of start building a FiveWin program

#include "FiveWin.ch"

static oWnd      

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

function Main()

   local oIco, oBar, oBmp

   DEFINE ICON oIco FILE "..\icons\fax.ico"

   DEFINE WINDOW oWnd FROM 1, 1 TO 22, 75 ;
      TITLE "FiveWin sample" ;
      MENU  BuildMenu() ;
      COLOR "B/W" ;
      ICON oIco

   DEFINE BUTTONBAR oBar _3D SIZE 26, 27 OF oWnd

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\new.bmp" FLAT ;
      ACTION MsgInfo( "New" ) ;
      TOOLTIP "Creates a new document"

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\open.bmp" FLAT ;
      ACTION MsgInfo( cGetFile( "*.*", "Select a document to open" ) ) ;
      TOOLTIP "Opens a document" WHEN .f.

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\floppy.bmp" FLAT ;
      ACTION MsgInfo( Time() ) TOOLTIP "Saves this document"

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\printer.bmp" FLAT ;
      ACTION MsgInfo( "Prints this document" ) TOOLTIP "Print this document" GROUP

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\prop.bmp" FLAT ;
      ACTION PrinterSetup() TOOLTIP "Setup the printer"

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\HelpInd.bmp" FLAT ;
      ACTION MsgInfo( Version() ) TOOLTIP "A multiple lines" + ;
      Chr( 13 ) + Chr( 10 ) + "tooltip!" GROUP

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\Help.bmp" FLAT ;
      ACTION MsgInfo( "fivewin power!" ) TOOLTIP "fivewin power!"

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\Exit.bmp" FLAT ;
      ACTION oWnd:End() TOOLTIP "Exit this app" GROUP

   DEFINE MESSAGE OF oWnd ;
      PROMPT FWVERSION + " " + FWCOPYRIGHT ;
      NOINSET CENTERED KEYBOARD DATE CLOCK

   DEFINE BITMAP oBmp FILENAME "..\bitmaps\fiveback.bmp"

   oWnd:bPainted = { | hDC | BmpTiled( hDC, oWnd, oBmp ) }

   ACTIVATE WINDOW oWnd ;
      VALID MsgYesNo( "Do you want to quit ?" )

return nil

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

function BuildMenu()

   local oMenu

   MENU oMenu
      MENUITEM "Information"
      MENU
         MENUITEM "&About..." ;
            ACTION MsgInfo( FWDESCRIPTION ) ;
            FILENAME "..\bitmaps\16x16\info.bmp"
         SEPARATOR
         MENUITEM "&End..."  ;
            ACTION oWnd:End() FILENAME "..\bitmaps\16x16\exit.bmp"

      ENDMENU

      MENUITEM "&Clients"
      MENU
         MENUITEM "&New..." ;
            ACTION ( MsgStop( "New Clients" ),;
                     oWnd:Say( 5, 5, "New Clients...", "GR+/G" ) ) ;
            FILENAME "..\bitmaps\16x16\faces.bmp"

         MENUITEM "&Modify..."  ACTION MsgInfo( "Modif. Clients" ) ;
            FILENAME "..\bitmaps\edit.bmp"

         MENUITEM "&Delete..."  ACTION MsgAlert( "Del Clients" ) ;
            FILENAME "..\bitmaps\16x16\delete.bmp"

         SEPARATOR

         MENUITEM "&Browse..."  ACTION MsgInfo( "Browse Clients" ) ;
            FILENAME "..\bitmaps\16x16\browse.bmp"

      ENDMENU

      MENUITEM "&Utilities"
      MENU
         MENUITEM "&Calculator..." ACTION WinExec( "Calc" ) ;
            FILENAME "..\bitmaps\16x16\calc.bmp"

         MENUITEM "&Internet..." ;
            ACTION WinExec( "start iexplore www.fivetech.com", 0 ) ;
            FILENAME "..\bitmaps\16x16\explorer.bmp"
      ENDMENU
   ENDMENU

return oMenu

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

STATIC FUNCTION BmpTiled( hDC, oWnd, oBmp )

   local nWidth := oWnd:nWidth(), nHeight := oWnd:nHeight()
   local nRow := 0, nCol := 0, n
   local nBmpWidth  := oBmp:nWidth(),  nBmpHeight := oBmp:nHeight()

   if oBmp:hBitmap == 0
      return nil
   endif

   while nRow < nHeight
      nCol = 0
      while nCol < nWidth
         PalBmpDraw( hDC, nRow, nCol, oBmp:hBitmap )
         nCol += nBmpWidth
      end
      nRow += nBmpHeight
   end

return nil

//----------------------------------------------------------------------------//
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
User avatar
Antonio Linares
Site Admin
Posts: 42393
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 9 times
Been thanked: 41 times
Contact:

Re: HBMK2 - Barra de estado y barra principal mas pequenas

Post by Antonio Linares »

Las dimensiones de los botones de la barra de botones se establecen aqui:

DEFINE BUTTONBAR oBar _3D SIZE 26, 27 OF oWnd

cambia el 26 y 27 por otros valores

En que resolución de pantalla estas trabajando ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
Compuin
Posts: 1237
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada

Re: HBMK2 - Barra de estado y barra principal mas pequenas

Post by Compuin »

Hola,

Ya he realizado ese cambio pero sigue quedando mas pequena que cuando lo compilo con el buildh.bat de samples

Mi resolucion es estandar, 1920 x 1080 (La recomendada por Windows 11)
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
User avatar
karinha
Posts: 7910
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Been thanked: 3 times
Contact:

Re: HBMK2 - Barra de estado y barra principal mas pequenas

Post by karinha »

Code: Select all | Expand

// C:\FWH..\SAMPLES\TUTOR04.PRG Modificado por Joao Santos/Sao Paulo/Brasil.

// We are going to build a PullDown menu and we are going to assign it
// to our main Window

// This example is the typical way of start building a FiveWin program

#include "FiveWin.ch"

#Define aPubGrad {| lInvert | If( lInvert, ;
                 { { 1 / 3, nRGB( 255, 253, 222 ), nRGB( 255, 231, 151 ) }, ;
                 { 2 / 3, nRGB( 255, 215,  84 ), nRGB( 255, 233, 162 ) }    ;
                 },                                                         ;
                 { { 1 / 2, nRGB( 219, 230, 244 ), nRGB( 207 - 50, 221 - 25, 255 ) }, ;
                 { 1 / 2, nRGB( 201 - 50, 217 - 25, 255 ), nRGB( 231, 242, 255 ) }    ;
                 } ) }

STATIC oWnd

FUNCTION Main()

   LOCAL oIco, oBar, oBmp

   hb_gcAll( .F. )

   SET CENTURY ON
   SET DATE BRITISH
   SET TIME FORMAT TO "HH:MM:SS"
   SET EPOCH TO YEAR( DATE() ) - 30
   SET SOFTSEEK OFF
   SET WRAP ON
   SETCANCEL( .F. )
   SET CONFIRM ON
   SET DELETED ON
   SET _3DLOOK ON
   SET UNIQUE OFF
   SET ESCAPE OFF
   SET EXACT ON       // CONTROLA O :=, = e ==
   SET EXCLUSIVE OFF
   SET MULTIPLE OFF
   SET OPTIMIZE ON

   // No cargar la aplicacion dos veces.
   IF ISEXERUNNING( CFILENAME( hb_argv( 0 ) ) )

      MsgInfo( "Tutor04.exe Já Está Rodando Nesta Máquina", "Tutor04.exe" )

      SHOWWINDOW( FINDWINDOW( 0, "TUTOR04" ), 9 ) // Nombre tu .EXE

      SETFOREGROUNDWINDOW( FINDWINDOW( 0, "TUTOR04" ) )

      LIBERA_TUDO()

      RETURN NIL

   ENDIF

   DEFINE ICON oIco FILE "..\icons\fax.ico"

   DEFINE WINDOW oWnd FROM 1, 1 TO 22, 75 MDI ;
      TITLE "FiveWin sample"                  ;
      MENU  BuildMenu()                       ;
      COLOR "B/W" ICON oIco

   // DEFINE BUTTONBAR oBar _3D SIZE 26, 27 OF oWnd
   DEFINE BUTTONBAR oBar BUTTONSIZE 64, 52 _3DLOOK TOP OF oWnd 2007

   WITH OBJECT oBar // VER: ANCHO.PRG

      oBar:bClrGrad := aPubGrad
      // oBar:SetFont( oFont )
      oBar:nClrText := CLR_HBLUE // BLACK
      oBar:Adjust()

   END

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\new.bmp" FLAT ;
      ACTION MsgInfo( "New" ) ;
      TOOLTIP "Creates a new document"

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\open.bmp" FLAT ;
      ACTION MsgInfo( cGetFile( "*.*", "Select a document to open" ) ) ;
      TOOLTIP "Opens a document" WHEN .F.

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\floppy.bmp" FLAT ;
      ACTION( TESTGET() )
      //MsgInfo( Time() ) TOOLTIP "Saves this document"

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\printer.bmp" FLAT ;
      ACTION MsgInfo( "Prints this document" ) TOOLTIP "Print this document" GROUP

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\prop.bmp" FLAT ;
      ACTION PrinterSetup() TOOLTIP "Setup the printer"

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\HelpInd.bmp" FLAT ;
      ACTION MsgInfo( Version() ) TOOLTIP "A multiple lines" + ;
      Chr( 13 ) + Chr( 10 ) + "tooltip!" GROUP

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\Help.bmp" FLAT ;
      ACTION MsgInfo( "fivewin power!" ) TOOLTIP "fivewin power!"

   DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\Exit.bmp" FLAT ;
      ACTION( oWnd:End(), LIBERA_TUDO() ) TOOLTIP "Exit this app" GROUP

   DEFINE MESSAGE OF oWnd ;
      PROMPT FWVERSION + " " + FWCOPYRIGHT ;
      NOINSET CENTERED KEYBOARD DATE CLOCK 2007

   DEFINE BITMAP oBmp FILENAME "..\bitmaps\visual.bmp"

   oWnd:bPainted = {| hDC | BmpTiled( hDC, oWnd, oBmp ) }

   ACTIVATE WINDOW oWnd MAXIMIZED

      /* ;
      VALID MsgYesNo( "Do you want to quit ?" ) */

RETURN NIL

FUNCTION BuildMenu()

   LOCAL oMenu

   MENU oMenu 2007
   MENUITEM "Information"
   MENU
   MENUITEM "&About..." ;
      ACTION MsgInfo( FWDESCRIPTION ) ;
      FILENAME "..\bitmaps\16x16\info.bmp"
   SEPARATOR
   MENUITEM "&End..."  ;
      ACTION( oWnd:End(), LIBERA_TUDO() ) ;
      FILENAME "..\bitmaps\16x16\exit.bmp"

   ENDMENU

   MENUITEM "&Clients"
   MENU
   MENUITEM "&New..." ;
      ACTION ( MsgStop( "New Clients" ), ;
      oWnd:Say( 5, 5, "New Clients...", "GR+/G" ) ) ;
      FILENAME "..\bitmaps\16x16\faces.bmp"

   MENUITEM "&Modify..."  ACTION MsgInfo( "Modif. Clients" ) ;
      FILENAME "..\bitmaps\edit.bmp"

   MENUITEM "&Delete..."  ACTION MsgAlert( "Del Clients" ) ;
      FILENAME "..\bitmaps\16x16\delete.bmp"

   SEPARATOR

   MENUITEM "&Browse..."  ACTION MsgInfo( "Browse Clients" ) ;
      FILENAME "..\bitmaps\16x16\browse.bmp"

   ENDMENU

   MENUITEM "&Utilities"
   MENU
   MENUITEM "&Calculator..." ACTION WinExec( "Calc" ) ;
      FILENAME "..\bitmaps\16x16\calc.bmp"

   MENUITEM "&Internet..." ;
      ACTION WinExec( "start iexplore www.fivetech.com", 0 ) ;
      FILENAME "..\bitmaps\16x16\explorer.bmp"
   ENDMENU
   ENDMENU

RETURN oMenu
// --Fecha o Programa Definitivamente e Libera a Memoria RAM.
FUNCTION LIBERA_TUDO()

   IF File( "TUTOR04.LOG" )
      DELETEFILE( "TUTOR04.LOG" )
   ENDIF

   dbCommitAll()
   dbUnlockAll()
   dbCloseAll()
   FreeResources()
   RELEASE ALL
   SysRefresh()

   hb_gcAll( .T. )

   CLEAR MEMORY

   PostQuitMessage( 0 )

   QUIT

RETURN NIL

STATIC FUNCTION BmpTiled( hDC, oWnd, oBmp )

   LOCAL nWidth := oWnd:nWidth(), nHeight := oWnd:nHeight()
   LOCAL nRow := 0, nCol := 0 // , n
   LOCAL nBmpWidth  := oBmp:nWidth(),  nBmpHeight := oBmp:nHeight()

   IF oBmp:hBitmap == 0
      RETURN NIL
   ENDIF

   WHILE nRow < nHeight
      nCol = 0
      WHILE nCol < nWidth
         PalBmpDraw( hDC, nRow, nCol, oBmp:hBitmap )
         nCol += nBmpWidth
      END
      nRow += nBmpHeight
   END

RETURN NIL

FUNCTION TESTGET()

   LOCAL oDlg, oGet
   LOCAL cCad := "Testing    " // pad("Testing Gets",40)
   LOCAL nNum := 0
   LOCAL dDat := Date()

   SET CONFIRM ON

   DEFINE DIALOG oDlg TITLE "TGet from " + FWDESCRIPTION

   @ 1,    2 SAY "Text..:" OF oDlg

   @ 1,    6 GET oGet VAR cCad OF oDlg SIZE 60, 10 COLOR "W/G" PICTURE "@K"

   @ 1.8,  2 SAY "Number:" OF oDlg

   @ 2,    6 GET oGet VAR nNum OF oDlg SIZE 60, 10 PICTURE "9999999.99"

   @ 2.6,  2 SAY "Date:" OF oDlg

   @ 3,    6 GET oGet VAR dDat PICTURE "@E" OF oDlg SIZE 60, 10  // "@D"

   @ 3,    7 BUTTON "&Ok" OF oDlg SIZE 30, 12 ACTION oDlg:End()

   @ 3,   16 BUTTON "&Saida" SIZE 30, 12 OF oDlg ACTION oDlg:End() CANCEL
   
   // TGet():SetColorFocus( nRGB( 200, 120, 120 ) )

   ACTIVATE DIALOG oDlg CENTERED

RETURN NIL

// FIN / END
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Compuin
Posts: 1237
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada

Re: HBMK2 - Barra de estado y barra principal mas pequenas

Post by Compuin »

Hola Karina

No entiendo eso que tratanstes de enviar pero no soluciona el problema tampoco
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
User avatar
karinha
Posts: 7910
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Been thanked: 3 times
Contact:

Re: HBMK2 - Barra de estado y barra principal mas pequenas

Post by karinha »

Por favor muéstrame una foto para que pueda entender qué no es bueno para ti, ¿vale? Gracias.

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Compuin
Posts: 1237
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada

Re: HBMK2 - Barra de estado y barra principal mas pequenas

Post by Compuin »

A la izquierda, compilado con buildh32.bat y a la derecha compilado con hbmk2.exe

https://tinypic.host/images/2025/01/16/Screenshot_3.jpg
Last edited by Compuin on Thu Jan 16, 2025 8:06 pm, edited 1 time in total.
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
User avatar
karinha
Posts: 7910
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Been thanked: 3 times
Contact:

Re: HBMK2 - Barra de estado y barra principal mas pequenas

Post by karinha »

Mi antivirus (AVG) no me permitió abrir esta página/Imagen debido a una amenaza detectada. Creo que quisiste decir que con BCC32 es perfecto, y con el compilador de Microsoft (no me gusta nada) no es bueno, ¿no? Si es así, habla con el maestro Navarro, ¿vale?

Gracias, regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Compuin
Posts: 1237
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada

Re: HBMK2 - Barra de estado y barra principal mas pequenas

Post by Compuin »

No, eso no fue lo que quise decir. Ambas compilaciones son con Visual Studio (Buildh32.bat), ya no uso Borland. De hecho a quien le pedi ayuda inicialmente fue al maestro Linares
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
User avatar
karinha
Posts: 7910
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Been thanked: 3 times
Contact:

Re: HBMK2 - Barra de estado y barra principal mas pequenas

Post by karinha »

Voy a hacer una DEMO usando BCC32 y podrás probarlo y decirme si hay alguna diferencia, ¿vale?

Gracias, tks.

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
Posts: 7910
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Been thanked: 3 times
Contact:

Re: HBMK2 - Barra de estado y barra principal mas pequenas

Post by karinha »

Compile este ejemplo usando el compilador de Microsoft, compárelo con el ejecutable generado con BCC32 por favor, ¿vale?

Download completo de mi mega upload:

https://mega.nz/file/MFkyFCza#3oUrM3KOM ... e-LznIW1w8

Gracias, tks.

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Compuin
Posts: 1237
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada

Re: HBMK2 - Barra de estado y barra principal mas pequenas

Post by Compuin »

Sigue siendo mas pequeno el generado con hbmk2.exe
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
User avatar
karinha
Posts: 7910
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Been thanked: 3 times
Contact:

Re: HBMK2 - Barra de estado y barra principal mas pequenas

Post by karinha »

Compuin wrote: Thu Jan 16, 2025 8:27 pm Sigue siendo mas pequeno el generado con hbmk2.exe
No uso. Mira se ayuda:

https://forums.fivetechsupport.com/view ... rt#p270607

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
JoséQuintas
Posts: 56
Joined: Tue Feb 09, 2021 4:20 pm

Re: HBMK2 - Barra de estado y barra principal mas pequenas

Post by JoséQuintas »

tutor04.rc

Code: Select all | Expand

#ifndef __64__
   1 24 ".\WinXP\WindowsXP.Manifest"
#endif

#ifdef __64__
   1 24 "WinXP/WindowsXP.Manifest64"
#endif
Para ser compatible con cualquier compilador use \\

Code: Select all | Expand

1 24 \\WinXP\\WindowsXP.Manifest
Lo he usado así (\\) con bcc, msvc y mingw.
prueba se resuelve.
José M. C. Quintas Brazil
gtwvg, fivewin 24.10 mt, hwgui, mingw 15.0 rc (32 bits)
Post Reply