- Code: Select all Expand view
- HB_FUNC( GETACP ) { hb_retni( GetACP() ); }
HB_FUNC( GETOEMCP ) { hb_retni( GetOEMCP() ); }
HB_FUNC( GETACP ) { hb_retni( GetACP() ); }
HB_FUNC( GETOEMCP ) { hb_retni( GetOEMCP() ); }
#include "fivewin.ch"
REQUEST HB_LANG_PT
REQUEST HB_CODEPAGE_PT850
FUNCTION Main()
// before setting codepage
? GetOEMCP(), GetACP(), HB_CDPUNIID() // , HBCDP() ?? NOT XHARBOUR
// Result: 850-1252-cp437 - FWH1905 - HARBOUR
HB_SETCODEPAGE( "PT850" )
? GetOEMCP(), GetACP(), HB_CDPUNIID() // , HBCDP() ?? NOT XHARBOUR
// Result: 850-1252-cp850 - FWH1905 - HARBOUR
RETURN NIL
#pragma BEGINDUMP
#include <windows.h>
#include <hbapi.h>
HB_FUNC( GETACP ) { hb_retni( GetACP() ); }
HB_FUNC( GETOEMCP ) { hb_retni( GetOEMCP() ); }
#pragma ENDDUMP
-> SkinButtons() // Problemas con este comando en versiones nuevas?
METHOD Html() INLINE ButtonHtml( ::hWnd )
METHOD Display() INLINE ::BeginPaint(), ::CalcSize(), ::Paint(), ::EndPaint(), 0
METHOD Paint() INLINE ( CallWindowProc( ::nOldProc, ::hWnd, WM_PAINT, ::hDC, 0 ), 1 )
ENDCLASS
METHOD Html() INLINE ButtonHtml( ::hWnd )
if ! SetSkins()
METHOD Display() INLINE ::BeginPaint(), ::CalcSize(), ::Paint(), ::EndPaint(), 0
METHOD Paint() INLINE ( CallWindowProc( ::nOldProc, ::hWnd, WM_PAINT, ::hDC, 0 ), 1 )
endif
ENDCLASS
nageswaragunupudi wrote:using GDIPLUS, see what the ampersand looks like.
I noticed this and will provide a fix.
nClr := XEval( nClr, ::lMover, Self )
if ::lGdip .and. HB_ISNUMERIC( nClr ) .and. !lAnd( nClr, 0xff000000 )
nClr := nARGB( 255, nClr )
endif
::SayText( cCaption, oRect:aRect, cAlign, oFont, nClr )
// Painting done
endif
return nil
nClr := XEval( nClr, ::lMover, Self )
/*
if ::lGdip .and. HB_ISNUMERIC( nClr ) .and. !lAnd( nClr, 0xff000000 )
nClr := nARGB( 255, nClr )
endif
*/
::SayText( cCaption, oRect:aRect, cAlign, oFont, nClr )
// Painting done
endif
return nil
#include "fivewin.ch"
function Main()
local oDlg, oFont, aGet[ 2 ], oBtn
local cText1 := "Good Morning "
local cText2 := "Good Evening "
SetGetColorFocus()
SkinButtons()
DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-24
DEFINE DIALOG oDlg FROM 0,0 TO 400,600 PIXEL TRUEPIXEL ;
TITLE "SkinButtons"
oDlg:SetFont( oFont )
@ 40,40 GET aGet[ 1 ] VAR cText1 SIZE 500,36 PIXEL OF oDlg ;
ACTION MsgInfo( "one" ) BITMAP "..\bitmaps\chkyes.bmp"
@ 100,40 GET aGet[ 2 ] VAR cText2 SIZE 500,36 PIXEL OF oDlg ;
ACTION MsgInfo( "two" ) BITMAP "..\bitmaps\cancel.bmp"
AEval( aGet, { |o| o:lAdjustBtn := .t. } )
// AEval( aGet, { |o| o:lBtnTransparent := .t. } )
@ 200, 40 BUTTON "&Button" SIZE 150,80 PIXEL OF oDlg
@ 200,220 BUTTONBMP PROMPT "&ButtonBmp" SIZE 320,80 PIXEL OF oDlg GDIP ;
BITMAP "..\bitmaps\pngs\image8.png" TEXTRIGHT
ACTIVATE DIALOG oDlg CENTERED
return nil
#include "fivewin.ch"
function Main()
local oDlg, oBrush, oFont, aGet[ 2 ], oBtn, oBtn2
local cText1 := "Good Morning "
local cText2 := "Good Evening "
SetGetColorFocus()
if MsgYesNo( "SkinButtons ?" )
SkinButtons()
endif
DEFINE BRUSH oBrush FILE "..\bitmaps\backgrnd\beach.bmp"
DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-24
DEFINE DIALOG oDlg FROM 0,0 TO 400,600 PIXEL TRUEPIXEL ;
TITLE "TITLE"
oDlg:SetBrush( oBrush )
oDlg:SetFont( oFont )
oDlg:lTransparent := MsgYesNo( "Transparent Dialog?" )
@ 40,40 GET aGet[ 1 ] VAR cText1 SIZE 500,36 PIXEL OF oDlg ;
ACTION MsgInfo( "one" ) BITMAP "..\bitmaps\chkyes.bmp"
@ 100,40 GET aGet[ 2 ] VAR cText2 SIZE 500,36 PIXEL OF oDlg ;
ACTION MsgInfo( "two" ) BITMAP "..\bitmaps\cancel.bmp"
AEval( aGet, { |o| o:lAdjustBtn := .t. } )
if MsgNoYes( "Transparent GetButtons?" )
AEval( aGet, { |o| o:lBtnTransparent := .t. } )
endif
@ 200, 40 BUTTON "&Button" SIZE 150,80 PIXEL OF oDlg
@ 200,220 BUTTONBMP oBtn PROMPT "&ButtonBmp" SIZE 320,80 PIXEL OF oDlg GDIP ;
BITMAP "..\bitmaps\pngs\image8.png" TEXTRIGHT
oBtn:lTransparent := MsgYesNo( "Transparent ButtonBmp?" )
@ 300,320 BTNBMP oBtn2 PROMPT "&BtnBmp" SIZE 220,80 PIXEL OF oDlg GDIP ;
BITMAP "..\bitmaps\pngs\image8.png" LEFT 2007
oBtn2:lTransparent := MsgNoYes( "Transparent BtnBmp?" )
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
RELEASE BRUSH oBrush
return nil
// C:\FWH\SAMPLES\TESTBMP6.PRG - Simplesmente Terrible!!!
#include "fivewin.ch"
FUNCTION Main()
LOCAL oDlg, oFont, aGet[ 2 ], oBtn, oBtn1, oBtn2, oBtn3, oBtn4, oSay
LOCAL cText1 := "Good Morning Mister Nages... "
LOCAL cText2 := "Good Evening Enrico: XHARBOUR?"
SkinButtons() // NO FUNCIONA CON XHARBOUR!! COMPILAR CON FWH19.05 PLS!!
DEFINE FONT oFont NAME "Segoe UI" SIZE 0, - 24
DEFINE DIALOG oDlg FROM 0, 0 TO 400, 600 PIXEL TRUEPIXEL FONT oFont ;
TITLE "COMPILAR CON XHARBOUR" TRANSPARENT
oDlg:lHelpIcon := .F.
@ 01, 15 SAY oSay PROMPT "Good Evening Enrico: Compile con XHARBOUR, Pls." ;
OF oDlg SIZE 440, 50 PIXEL COLORS CLR_BLACK, CLR_WHITE TRANSPARENT ADJUST ;
UPDATE
@ 40, 40 GET aGet[1] VAR cText1 SIZE 500, 36 PIXEL OF oDlg UPDATE ;
ACTION MsgInfo( "one" ) BITMAP "..\bitmaps\chkyes.bmp"
aGet[1]:lBtnTransparent := .T. // transparent button get aGet[1]
aGet[1]:lAdjustBtn := .T. // Button Get Adjust Witdh aGet[1]
aGet[1]:lDisColors := .F. // Deactive disable color
aGet[1]:nClrTextDis := CLR_WHITE // Color text disable status
aGet[1]:nClrPaneDis := CLR_BLUE // Color Pane disable status
@ 100, 40 GET aGet[2] VAR cText2 SIZE 500, 36 PIXEL OF oDlg UPDATE ;
ACTION MsgInfo( "two" ) BITMAP "..\bitmaps\cancel.bmp"
aGet[2]:lBtnTransparent := .T. // transparent button get aGet[1]
aGet[2]:lAdjustBtn := .T. // Button Get Adjust Witdh aGet[1]
aGet[2]:lDisColors := .F. // Deactive disable color
aGet[2]:nClrTextDis := CLR_WHITE // Color text disable status
aGet[2]:nClrPaneDis := CLR_BLUE // Color Pane disable stat
@ 200, 40 BUTTON oBtn PROMPT "&Button" SIZE 150, 80 PIXEL OF oDlg
oBtn:lTransparent := .F.
@ 145,220 BUTTONBMP oBtn1 PROMPT "&GDIP CON ButtonBmp" SIZE 320,50 PIXEL ;
OF oDlg BITMAP "..\bitmaps\pngs\image8.png" TEXTRIGHT GDIP
@ 200, 220 BUTTONBMP oBtn2 PROMPT "&ButtonBmp SIN GDIP" SIZE 320,80 PIXEL ;
OF oDlg BITMAP "..\bitmaps\pngs\image8.png" TEXTRIGHT
oBtn2:lTransparent := .T.
@ 300, 320 BTNBMP oBtn3 PROMPT "&BtnBmp CON GDIP" SIZE 220, 80 PIXEL ;
OF oDlg COLOR CLR_HBLUE, CLR_BLACK BITMAP "..\bitmaps\pngs\image8.png" ;
LEFT FLAT 2007 GDIP
oBtn3:lTransparent := .T.
oBtn3:nRound := 60
oBtn3:bClrGrad := { |lInvert| If( lInvert, 0x60FFA54A, nARGB( 64, 0, 192, 0 ) ) }
oBtn3:SetThemed(.T.)
@ 300, 005 BTNBMP oBtn4 PROMPT "BtnBmp &SIN GDIP" SIZE 220, 80 PIXEL OF oDlg ;
BITMAP "..\bitmaps\pngs\image8.png" LEFT FLAT 2007
oBtn4:lTransparent := .T.
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
RETURN NIL
// FIN / END - kapiabafwh@gmail.com
Good morning Master Nages. Below is a simple example used DAY to DAY in a IT company and how I teach and provide support. Master Nages, I ONLY USE XHARBOUR!
nageswaragunupudi wrote:Mr. João Santos (Karinha)-> SkinButtons() // Problemas con este comando en versiones nuevas?
Please apply this fix in \fwh\source\classes\button.prg
Please locate these lines at the end of the TBUTTON CLASS definition.
- Code: Select all Expand view
METHOD Html() INLINE ButtonHtml( ::hWnd )
METHOD Display() INLINE ::BeginPaint(), ::CalcSize(), ::Paint(), ::EndPaint(), 0
METHOD Paint() INLINE ( CallWindowProc( ::nOldProc, ::hWnd, WM_PAINT, ::hDC, 0 ), 1 )
ENDCLASS
Please modify these lines as:
- Code: Select all Expand view
METHOD Html() INLINE ButtonHtml( ::hWnd )
if ! SetSkins()
METHOD Display() INLINE ::BeginPaint(), ::CalcSize(), ::Paint(), ::EndPaint(), 0
METHOD Paint() INLINE ( CallWindowProc( ::nOldProc, ::hWnd, WM_PAINT, ::hDC, 0 ), 1 )
endif
ENDCLASS
Please apply this fix and let us know if the problem is resolved.
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 78 guests