Method BmpToSymbol(f_cBitMap) Class TButtonBmp
Local uCodeOrBmp := Nil
If Empty(f_cBitMap)
Return nil
EndIf
If ValType(f_cBitMap) == "N"
::lBmpCodeFnt := .T.
Return f_cBitMap
EndIf
f_cBitmap := Upper(f_cBitMap)
If Hb_At("CANCE",f_cBitMap) > 0
uCodeOrBmp := 59961 //X-roundNegativo=60304 //X=59719
ElseIf Hb_At("ALTERA",f_cBitMap) > 0
uCodeOrBmp := 61014
ElseIf Hb_At("BORRACHA",f_cBitMap) > 0 .OR. ;
Hb_At("APAGA",f_cBitMap) > 0
uCodeOrBmp := 59228
ElseIf Hb_At("CALENDARIO",f_cBitMap) > 0
uCodeOrBmp := 59637
ElseIf Hb_At("CALCULADORA",f_cBitMap) > 0
uCodeOrBmp := 59631
ElseIf Hb_At("CONFIRMA",f_cBitMap) > 0
uCodeOrBmp := 59696 //mao=57759
ElseIf Hb_At("DATAEXTRACT",f_cBitMap) > 0
uCodeOrBmp := 58036
ElseIf Hb_At("DATAINSERT",f_cBitMap) > 0
uCodeOrBmp := 58035
ElseIf Hb_At("DETALHE",f_cBitMap) > 0
uCodeOrBmp := 57692
ElseIf Hb_At("EMAIL",f_cBitMap) > 0
uCodeOrBmp := 59992 //57632
ElseIf Hb_At("ENGRENAGEM",f_cBitMap) > 0
uCodeOrBmp := 57621
ElseIf Hb_At("LIXO",f_cBitMap) > 0
uCodeOrBmp := 57607 // 59213
ElseIf Hb_At("EXCLUI",f_cBitMap) > 0 .OR. ;
Hb_At("DELET",f_cBitMap) > 0
uCodeOrBmp := 59228
ElseIf Hb_At("FILT",f_cBitMap) > 0
uCodeOrBmp := 57710
ElseIf Hb_At("GRAVA",f_cBitMap) > 0 .OR. ;
Hb_At("SALVA",f_cBitMap) > 0
uCodeOrBmp := 59214
ElseIf Hb_At("IMPORT",f_cBitMap) > 0
uCodeOrBmp := 57624
ElseIf Hb_At("INCLUI",f_cBitMap) > 0 .OR. ;
Hb_At("NOVO",f_cBitMap) > 0
uCodeOrBmp := 60616
ElseIf Hb_At("INTERROGACAO",f_cBitMap) > 0
uCodeOrBmp := 59543 //61762
ElseIf Hb_At("_OK",f_cBitMap) > 0
uCodeOrBmp := 59696 //V-roundNegativo=60513 //V=59643
ElseIf Hb_At("SCAN",f_cBitMap) > 0
uCodeOrBmp := 59646
ElseIf Hb_At("EXIT",f_cBitMap) > 0
uCodeOrBmp := 59368 //59718
ElseIf Hb_At("REVERTCLOCK",f_cBitMap) > 0
uCodeOrBmp := 59420
ElseIf Hb_At("SELECIONA",f_cBitMap) > 0
uCodeOrBmp := 57506
ElseIf Hb_At("CARIMBO",f_cBitMap) > 0
uCodeOrBmp := 57796
ElseIf Hb_At("LUPA",f_cBitMap) > 0
uCodeOrBmp := 57626
ElseIf Hb_At("PRINTERECF",f_cBitMap) > 0
uCodeOrBmp := 60507
ElseIf Hb_At("PRINTER",f_cBitMap) > 0
uCodeOrBmp := 59209
ElseIf Hb_At("_RUN",f_cBitMap) > 0
uCodeOrBmp := 59717
ElseIf Hb_At("SETA_CICLO",f_cBitMap) > 0
uCodeOrBmp := 57623
ElseIf Hb_At("VISUALIZA",f_cBitMap) > 0
uCodeOrBmp := 61853
Else
uCodeOrBmp := f_cBitMap
EndIf
If ValType(uCodeOrBmp) == "N"
::lBmpCodeFnt := .T.
EndIf
Return uCodeOrBmp
// rip icon from external file
@ 50, 500 BTNBMP oBtn3 PROMPT " Rip " RESOURCE 0xE115 FONT oSegoe ;
ACTION SETIMAGE( oImage ) ;
ROUND BORDER TOP OF oFld:aDialogs[ 1 ] SIZE 100, 100 ;
COLOR nBTColor, nBColor
oBtn3:bColorMap := {|| { , nSColor } }
@ 50,620 XIMAGE oImage SIZE 100,100 OF oFld:aDialogs[ 1 ] PIXEL
@ 360, 500 BTNBMP oBtn1 PROMPT " Save " RESOURCE 0xE105 FONT oSegoe ;
ACTION MAKE_IMG(aData) ;
ROUND BORDER TOP OF oFld:aDialogs[ 1 ] SIZE 100, 100 ;
COLOR nBTColor, nBColor
oBtn1:bColorMap := {|| { , nSColor } }
@ 360, 630 BTNBMP oBtn2 PROMPT " Save " RESOURCE 0xE105 FONT oAsset ;
ACTION F_BACKGRD( oFld, CLR_GREEN ) ;
ROUND BORDER TOP OF oFld:aDialogs[ 1 ] SIZE 100, 100 ;
COLOR nBTColor, nBColor
oBtn2:bColorMap := {|| { , nSColor } }
FUNC GetNewFont(cFont, nSize) //Resource Matrix Font
LOCAL hRes := FindResource( GetResources(), cFont, 10) //RT_RCDATA )
LOCAL hFont := LoadResource( GetResources(), hRes )
LOCAL cResFont := cResToStr(cFont,10)
LOCAL nFonts := 0
LOCAL nHandle := AddFontMemResourceEx( hFont, Len(cResFont), 0, @nFonts)
LOCAL oFont := TFont():New("ScreenMatrix",0,-nSize)
oFont:hFont = CreateFont( { -nSize, 0, 0,;
0,, .f.,;
.f., .f., 1,;
0, 0,;
0, 0, "ScreenMatrix" } )
RETURN oFont
//-------------------------
DLL32 FUNCTION AddFontMemResourceEx(nAddr AS PTR, nLen AS DWORD, nPdv AS LONG, @nCnt AS DWORD) ;
AS LONG PASCAL FROM "AddFontMemResourceEx" LIB "gdi32.dll"
DLL32 FUNCTION RemoveFontMemResourceEx( nHnd AS LONG) AS BOOL;
PASCAL FROM "RemoveFontMemResourceEx" LIB "gdi32.dll"
Marcelo Roggeri wrote:Hola buenos días, necesito ver todas las fuentes Segoe MDL2 y hacer un browse con el codigo de font y su icono,
encontré esto pero solo me muestra un limite de iconos
FOR n := 0xE100 to 0XE140
AAdd( aData, { n, HB_UTF8CHR( n ) } )
NEXT
Gracias de antemano
Saludos
jpcavagnaro wrote:Hola Giovanni, buenas tardes, perdón la molestia.
Estoy tratando de modificar la imagen de mis programas y no logro que me funcione segoe symbol
Me podrías pasar un ejemplo, me gusto mucho el diseño a pesar que no se ve toda la pantalla.
Saludos.-
Jorge Cavagnaro
jpcavagnaro@yahoo.com.ar
#include "fivewin.ch"
function Main()
local oDlg, oFont
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
DEFINE DIALOG oDlg SIZE 270,280 PIXEL TRUEPIXEL FONT oFont ;
TITLE "Segoe MDL2 Assets on Buttons"
@ 40, 40 BTNBMP PROMPT "First" RESOURCE 0xE100 SIZE 80,80 PIXEL OF oDlg FLAT
@ 40,150 BTNBMP PROMPT "Last" RESOURCE 0xE101 SIZE 80,80 PIXEL OF oDlg FLAT
@ 160, 40 BUTTONBMP PROMPT "Edit" RESOURCE 0xE104 SIZE 80,80 PIXEL OF oDlg TEXTBOTTOM
@ 160,150 BUTTONBMP PROMPT "Save" RESOURCE 0xE105 SIZE 80,80 PIXEL OF oDlg TEXTBOTTOM
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
return nil
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 39 guests