BTNBMP MenuPop

BTNBMP MenuPop

Postby EASYSOFT » Tue Aug 27, 2024 2:45 pm

Estimados compañeros buenos días.

Necesito usar en BTNBMP MenuPop pero no encuentro la manera, no quiero utilizar esta opción en la opción action necesito algo como lo siguiente

REDEFINE BTNBMP aBtn1[X] ID i FONT oFont5 PROMPT 'Salir' PIXEL 2007 FILE if(tmesas->tmestado = .T.,"\FWH\IMAGENES\mesa.BMP","\FWH\IMAGENES\mesa_vacia.BMP") LEFT TOOLTIP "Salir de la pantalla" NOBORDER ROUND ;
OF oDlgm GRADIENT { || {{ 1, RGB( 0, 128, 128 ), nRgb(0, 128, 128 ) }} } ;
ACTION aAct1

MENU ACTION MenuPop()

Muchas gracias
Saludos
Oscar
Fwh 10.4, bcc55
EASYSOFT
 
Posts: 185
Joined: Sat Oct 22, 2005 1:17 pm
Location: Quito - Ecuador

Re: BTNBMP MenuPop

Postby karinha » Tue Aug 27, 2024 3:23 pm

https://forums.fivetechsupport.com/~fivetec1/forums/viewtopic.php?f=3&t=35769

https://www.fivetechsupport.com/forums/viewtopic.php?f=3&t=44382&start=0

Code: Select all  Expand view  RUN

#include "fivewin.ch"

FUNCTION test()

   LOCAL oDlg, oBtn
   LOCAL oFont, oBold
   LOCAL pippo := "mmm"
   LOCAL oGet
   LOCAL oCursorBtn := TCursor():New(, 'HAND' )

   LOCAL nWd  := GetSysMetrics( 0 ) * .58
   LOCAL nHt  := ( GetSysMetrics( 1 ) / 2 ) - 20

   oFont := TFont():New( "Tahoma", 0, 14,, )
   oBold := TFont():New( "Tahoma", 0, 14,, .T. )

   DEFINE DIALOG oDlg SIZE nWd, nHt PIXEL TRUEPIXEL;
      FONT oFont   COLOR CLR_BLACK, RGB( 245, 245, 235 )  ;
      STYLE nOR( DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, ;
      WS_MINIMIZEBOX )

   @ 10, 450 BTNBMP  oBtn ;
      NAME "COMBOBMP"       ;
      SIZE 100, 25 PIXEL    ;
      PROMPT "testobutton"      ;
      FONT oFont  FLAT  RIGHT ;
      COLOR  CLR_BLACK, RGB( 245, 245, 235 );
      ACTION ::ShowPopUp( {| oBtn, nRow, nCol | oBtnMenu( oBtn )     } )

   /*
   oBtn:bClrGrad := { | lInvert | If( ! lInvert, ;
            { { 1, nRGB( 255, 255, 255 ), nRGB( 207, 207, 207 ) } }, ;
            { { 1/3, nRGB( 255, 253, 222 ), nRGB( 255, 231, 151 ) }, ;
            { 2/3, nRGB( 255, 215,  84 ), nRGB( 255, 233, 162 ) } } ) }
   */



   oBtn:bClrGrad = {| lInvert | If( ! lInvert, ;
      { { 0.25, RGB( 245, 245, 235 ), RGB( 250, 250, 245 ) }, ;
      { 0.75, RGB( 250, 250, 245 ), RGB( 245, 245, 235 ) } }, ;
      { { 0.25, RGB( 250, 250, 245 ), RGB( 245, 245, 235 ) }, ;
      { 0.75, RGB( 245, 245, 235 ), RGB( 250, 250, 245 ) } } ) }
   oBtn:nClrBorder := iif( oBtn:lMOver, RGB( 219, 230, 244 ), RGB( 219, 230, 244 ) )
   oBtn:oCursor :=   oCursorBtn


   @ 5, 50 GET oget VAR pippo OF oDlg   // ******************************


   ACTIVATE DIALOG oDlg CENTERED ON INIT oGet:setfocus()

RETURN NIL

FUNCTION oBtnMenu( oBtn )

   LOCAL oMenu

   MENU oMenu POPUP

      MenuItem "XXXXXXXXXXXXXXXXX"

      MenuItem "XXXXXXXXXXXXXXXXX"

      MenuItem "XXXXXXXXXXXXXXXXX"

   ENDMENU

RETURN( oMenu )

// FIN / END
 


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

Re: BTNBMP MenuPop SOLUCIONADO

Postby EASYSOFT » Wed Aug 28, 2024 5:06 pm

Joao muchas gracias

Funciona de esta manera

aBtn1[X]:oPopUp := { |oBtn| MenuPop( oBtn, oDlgm,aBtn1,aTestData,oBrw ) }

Gracias
Saludos
Oscar
Fwh 10.4, bcc55
EASYSOFT
 
Posts: 185
Joined: Sat Oct 22, 2005 1:17 pm
Location: Quito - Ecuador

Re: BTNBMP MenuPop

Postby EASYSOFT » Wed Aug 28, 2024 5:15 pm

Disculpen como puedo redoendear las esquinas del botón

Gracias
Saludos
Oscar
Fwh 10.4, bcc55
EASYSOFT
 
Posts: 185
Joined: Sat Oct 22, 2005 1:17 pm
Location: Quito - Ecuador

Re: BTNBMP MenuPop

Postby karinha » Wed Aug 28, 2024 5:46 pm

Code: Select all  Expand view  RUN

   oBtn:nRound := 60
 


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

Re: BTNBMP MenuPop

Postby karinha » Wed Aug 28, 2024 6:24 pm

Code: Select all  Expand view  RUN

// C:\FWH\SAMPLES\BTNREDON.PRG

#Include "FiveWin.ch"

STATIC oWnd

FUNCTION Main()

   LOCAL oDlg, oBtn, oBtn2
   LOCAL oCursorBtn := TCursor():New(, 'HAND' )

   DEFINE DIALOG oDlg SIZE 250, 250 PIXEL TRUEPIXEL

   oDlg:lHelpIcon := .F.

   @  20, 20 BTNBMP oBtn PROMPT "REDONDO1" SIZE 200, 100 PIXEL OF oDlg FLAT ;
      2007 COLOR CLR_WHITE, CLR_GREEN NOBORDER

   oBtn:nRound  := 60
   oBtn:oCursor := oCursorBtn

   @ 160, 20 BTNBMP oBtn2 PROMPT "REDONDO2" SIZE 200, 60 PIXEL OF oDlg FLAT ;
      COLOR CLR_WHITE, CLR_HRED NOBORDER ACTION( oDlg:End() ) // SIN 2007

   oBtn2:nRound  := 30
   oBtn2:oCursor := oCursorBtn
   oBtn2:lCancel := .T.

   ACTIVATE DIALOG oDlg CENTERED

RETURN NIL

// FIN / END
 


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

Re: BTNBMP MenuPop

Postby EASYSOFT » Fri Aug 30, 2024 5:00 pm

Estimado Joao muchas gracias.

El ejemplo no funciona con recursos, quiza puedas hacer una prueba

Saludos
Saludos
Oscar
Fwh 10.4, bcc55
EASYSOFT
 
Posts: 185
Joined: Sat Oct 22, 2005 1:17 pm
Location: Quito - Ecuador

Re: BTNBMP MenuPop

Postby karinha » Fri Aug 30, 2024 6:53 pm

Muestra como estás haciendo. És en uma Window?

Prueba con el clausula: 2007, creo que asi funciona bien.

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

Re: BTNBMP MenuPop

Postby karinha » Fri Aug 30, 2024 7:21 pm

Look, mira, veja:

Code: Select all  Expand view  RUN

// Toggling buttons - C:\FWH\SAMPLES\MANUEL.PRG / .RC

#include "FiveWin.ch"

FUNCTION Main()

   LOCAL oDlg, oBtn, oBtn2, oBtn3, oSalida
   LOCAL oCursorBtn := TCursor():New(, 'HAND' )

   SkinButtons()

   DEFINE DIALOG oDlg RESOURCE "Main" // COLOR "N/B"

   REDEFINE BTNBMP oBtn ID 110 OF oDlg RESOURCE "Yes" NOBORDER  2007 ;
      ACTION ( oBtn:Toggle(), MsgBeep() )

   // oBtn:GoDown()

   oBtn:nRound  := 60
   oBtn:oCursor := oCursorBtn

   REDEFINE BTNBMP oBtn2 ID 120 OF oDlg RESOURCE "No" 2007

   oBtn2:nRound  := 60
   oBtn2:oCursor := oCursorBtn

   REDEFINE BTNBMP oSalida ID 130 OF oDlg RESOURCE "Cancel" 2007 ;
      ACTION( oDlg:End() )

   // oSalida:lEllipse = .T.
   oSalida:nRound  := 60
   oSalida:oCursor := oCursorBtn
   oSalida:lCancel := .T.

   ACTIVATE DIALOG oDlg CENTERED

RETURN NIL

/* // MANUEL.RC
#include "..\include\WinApi.ch"

Yes BITMAP "../bitmaps/yes.bmp"
No BITMAP "../bitmaps/no.bmp"
Cancel BITMAP "../bitmaps/cancel.bmp"

main DIALOG 50, 67, 162, 76
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "FiveWin Class TBtnBmp"
FONT 12, "MS Sans Serif"
{
 CONTROL "", 110, "TBtnBmp", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 9, 46, 43, 16
 CONTROL "", 120, "TBtnBmp", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 60, 46, 43, 16
 CONTROL "", 130, "TBtnBmp", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 110, 46, 42, 16
}
*/


// FIN / END - kapiabafwh@gmail.com - I am the best! hahahahahaha,
 


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

Re: BTNBMP MenuPop

Postby karinha » Fri Aug 30, 2024 8:41 pm

Image

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

Re: BTNBMP MenuPop

Postby EASYSOFT » Mon Sep 02, 2024 4:51 pm

Joao por favor dime como subor imagenes al foro
para poder ser claro en lo que me está pasando

Gracias
Saludos
Oscar
Fwh 10.4, bcc55
EASYSOFT
 
Posts: 185
Joined: Sat Oct 22, 2005 1:17 pm
Location: Quito - Ecuador

Re: BTNBMP MenuPop

Postby karinha » Mon Sep 02, 2024 4:57 pm

Oscar,

https://imgur.com/

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

Re: BTNBMP MenuPop

Postby EASYSOFT » Mon Sep 02, 2024 5:28 pm

Estoy tratando de enviar la imagen

Image

Utilizo fwh2310 bcc740, espero no sea problema de versiones

Muchas gracias
Saludos
Oscar
Fwh 10.4, bcc55
EASYSOFT
 
Posts: 185
Joined: Sat Oct 22, 2005 1:17 pm
Location: Quito - Ecuador

Re: BTNBMP MenuPop

Postby karinha » Mon Sep 02, 2024 5:50 pm

Ah, usas HARBOUR y yo [x]Harbour. Intenta con [x]Harbour primero, mira se tu BUILDX.BAT está asi:

Code: Select all  Expand view  RUN

@ECHO OFF
CLS

if A%1 == A GOTO :SINTAX
if NOT EXIST %1.prg GOTO :NOEXIST

ECHO Compiling...

if "%FWDIR%" == "" set FWDIR=.\..\
if "%XHDIR%" == "" set XHDIR=c:\xHBBCC74
rem if "%2" == "/b" set GT=gtwin
rem if not "%2" == "/b" set GT=gtgui
set GT=gtgui

set hdir=%XHDIR%
set hdirl=%hdir%\lib
set bcdir=c:\BCC74
set fwh=%FWDIR%

%hdir%\bin\harbour %1 /m /n /i%fwh%\include;%hdir%\include /w /p %2 %3 > comp.log 2> warnings.log

IF ERRORLEVEL 1 GOTO COMPILEERRORS
@type comp.log
@type warnings.log

echo -O2 -e%1.exe -I%hdir%\include -I%bcdir%\include %1.c > b32.bc
%bcdir%\bin\bcc32 -M -c -v @b32.bc
:ENDCOMPILE

IF EXIST %1.rc %bcdir%\bin\brc32.exe -r -I%bcdir%\include -I%bcdir%\include\windows\sdk %1

echo %bcdir%\lib\c0w32.obj    + > b32.bc
echo %1.obj,                  + >> b32.bc
echo %1.exe,                  + >> b32.bc
echo %1.map,                  + >> b32.bc
echo %fwh%\lib\Fivehx.lib %fwh%\lib\FiveHC.lib %fwh%\lib\libmysql.lib + >> b32.bc
echo %fwh%\lib\pgsql.lib %fwh%\lib\libpq.lib + >> b32.bc
echo %hdirl%\hbhpdf.lib     + >> b32.bc
echo %hdirl%\libharu.lib    + >> b32.bc
echo %hdirl%\png.lib        + >> b32.bc
echo %hdirl%\rtl.lib        + >> b32.bc
echo %hdirl%\vm.lib         + >> b32.bc
echo %hdirl%\%GT%.lib      + >> b32.bc
echo %hdirl%\lang.lib       + >> b32.bc
echo %hdirl%\macro.lib      + >> b32.bc
echo %hdirl%\rdd.lib        + >> b32.bc
echo %hdirl%\dbfntx.lib     + >> b32.bc
echo %hdirl%\dbfcdx.lib     + >> b32.bc
echo %hdirl%\dbffpt.lib     + >> b32.bc
echo %hdirl%\hbsix.lib      + >> b32.bc
echo %hdirl%\debug.lib      + >> b32.bc
echo %hdirl%\common.lib     + >> b32.bc
echo %hdirl%\codepage.lib   + >> b32.bc
echo %hdirl%\pp.lib         + >> b32.bc
echo %hdirl%\pcrepos.lib    + >> b32.bc
echo %hdirl%\ct.lib         + >> b32.bc
echo %hdirl%\zlib.lib       + >> b32.bc
echo %hdirl%\hbzip.lib      + >> b32.bc
echo %hdirl%\libmisc.lib    + >> b32.bc
echo %hdirl%\tip.lib        + >> b32.bc
echo %hdirl%\hbzebra.lib    + >> b32.bc

rem Uncomment these two lines to use Advantage RDD
rem echo %hdir%\lib\rddads.lib + >> b32.bc
rem echo %hdir%\lib\Ace32.lib  + >> b32.bc

echo %bcdir%\lib\cw32.lib          + >> b32.bc
echo %bcdir%\lib\import32.lib      + >> b32.bc
echo %bcdir%\lib\uuid.lib          + >> b32.bc
echo %bcdir%\lib\ws2_32.lib        + >> b32.bc
echo %bcdir%\lib\psdk\odbc32.lib   + >> b32.bc
echo %bcdir%\lib\psdk\rasapi32.lib + >> b32.bc
echo %bcdir%\lib\psdk\nddeapi.lib  + >> b32.bc
echo %bcdir%\lib\psdk\msimg32.lib  + >> b32.bc
echo %bcdir%\lib\psdk\psapi.lib    + >> b32.bc
echo %bcdir%\lib\psdk\gdiplus.lib  + >> b32.bc
echo %bcdir%\lib\psdk\iphlpapi.lib + >> b32.bc
echo %bcdir%\lib\psdk\urlmon.lib   + >> b32.bc
echo %bcdir%\lib\psdk\Uxtheme.lib  + >> b32.bc
echo %bcdir%\lib\psdk\shell32.lib,   >> b32.bc

IF EXIST %1.res echo %1.res >> b32.bc

rem uncomment this line to use the debugger and comment the following one
if %GT% == gtwin %bcdir%\bin\ilink32 -Gn -Tpe -s -v @b32.bc
IF ERRORLEVEL 1 GOTO LINKERROR
if %GT% == gtgui %bcdir%\bin\ilink32 -Gn -aa -Tpe -s -v @b32.bc
IF ERRORLEVEL 1 GOTO LINKERROR
ECHO * Application successfully built *
%1
GOTO EXIT
ECHO

rem delete temporary files
@del %1.c

:COMPILEERRORS
@type comp.log
ECHO * Compile errors *
GOTO EXIT

:LINKERROR
ECHO * Linking errors *
GOTO EXIT

:SINTAX
ECHO    SYNTAX: Build [Program]     {-- No especifiques la extensi?n PRG
ECHO                                {-- Don't specify .PRG extension
GOTO EXIT

:NOEXIST
ECHO The specified PRG %1 does not exist

:EXIT


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

Re: BTNBMP MenuPop

Postby karinha » Mon Sep 02, 2024 5:56 pm

Oscar, no tengo un FWH2310 para probar, pídele al Maestro Antônio un BUILDH.bat para FWH2310 con HARBOUR y BCC74 o BCC77.

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

Next

Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 60 guests