Home > database >  PB language do a drop-down menu (similar to the word and the tablet is used to change the font in th
PB language do a drop-down menu (similar to the word and the tablet is used to change the font in th

Time:09-25

Need to do a drop-down menu with PB language (similar to the word and tablet is used to change the font in the drop-down menu), the drop-down menu is the current system of all available fonts get user selected font, not a a backfill is better that the less code
50 points

CodePudding user response:

No one with yourself ~ ~ ~ ~ ~

CodePudding user response:

Online waiting for ~ ~

CodePudding user response:

Can be found on the net, I remember I download, where to download? Too long, I forget to
Pure pb code version and DLL version of the file name is getfont. DLL

CodePudding user response:

Seems not found online to have other languages or get all the font to add one ~ ~ ~

CodePudding user response:

I found a, this is the code
$PBExportHeader $w_choosefont. SRW
$PBExportComments $select font dialog demo window
Forward
Global type w_choosefont from window
End type
Type cb_choosefont from commandbutton within w_choosefont
End type
Type mle_1 from multilineedit within w_choosefont
End type
Type dw_1 from datawindow within w_choosefont
End type
Type logfont from structure within w_choosefont
End type
Type choosefont from structure within w_choosefont
End type
End forward

Type logfont from structure
Long lfheight
Long lfwidth
Long lfescapement
Long lforientation
Long lfweight
Character lfitalic
Character lfunderline
Character lfstrikeout
Character lfcharset
Character lfoutprecision
Character lfclipprecision
Character lfquality
Character lfpitchandfamily
Character lffacename [32]
End type

Type choosefont from structure
Long lstructsize
Long hwndowner
Long HDC
Long lplogfont
Long ipointsize
Long flags
Long rgbcolors
Long lcustdata
Long lpfnhook
Long lptemplatename
Long hinstance
Long lpszstyle
The integer nfonttype
The integer ___missing_alignment__
Long nsizemin
Long nsizemax
End type

Global type w_choosefont from window
The integer width=2391
The integer height=1216
Boolean titlebar=true
String title="font selection dialog demo"
Boolean controlmenu=true
Boolean the resizable=true
Long backcolor=67108864
String icon="Function!"
Cb_choosefont cb_choosefont
Mle_1 mle_1
Dw_1 dw_1
End type
Global w_choosefont w_choosefont

The type as
//font selection function
The FUNCTION ulong ChooseFont (ref ChooseFont pChoosefont) LIBRARY "comdlg32. DLL" ALIAS FOR "ChooseFontA
"
//memory function
The Function long GetLogFont (REF LOGFONT Destination, long the Source of long Size) library "kernel32. DLL" Alias For "RtlMoveMemory
"The Function long PutLogFont (long Destination, REF LOGFONT Source, long Size) library "kernel32. DLL" Alias For "RtlMoveMemory
"The Function long StrCopy (long Destination, REF string Source, long Size) library "kernel32. DLL" Alias for "RtlMoveMemory
"The Function long LocalAlloc (long Flags, long Bytes) library "kernel32. DLL
"The Function long LocalFree (long MemHandle) library "kernel32. DLL
"
End as

The type variables
//pointer constant
CONSTANT long CF_SCREENFONTS=1
CONSTANT long CF_PRINTERFONTS=2
CONSTANT long CF_BOTH=3
CONSTANT long CF_SHOWHELP=4
CONSTANT long CF_ENABLEHOOK=8
CONSTANT long CF_ENABLETEMPLATE=16
CONSTANT long CF_ENABLETEMPLATEHANDLE=32
CONSTANT long CF_INITTOLOGFONTSTRUCT=64
CONSTANT long CF_USESTYLE=128
CONSTANT long CF_EFFECTS=256
CONSTANT long CF_APPLY=512
CONSTANT long CF_ANSIONLY=1024
CONSTANT long CF_SCRIPTSONLY=CF_ANSIONLY
CONSTANT long CF_NOVECTORFONTS=2048
CONSTANT long CF_NOOEMFONTS=4096
CONSTANT long CF_NOSIMULATIONS=8192
CONSTANT long CF_LIMITSIZE=16384
CONSTANT long CF_FIXEDPITCHONLY=32768
CONSTANT long CF_WYSIWYG=65536
CONSTANT long CF_FORCEFONTEXIST=131072
CONSTANT long CF_SCALABLEONLY=262144
CONSTANT long CF_TTONLY=524288
CONSTANT long CF_NOFACESEL=1048576
CONSTANT long CF_NOSTYLESEL=2097152
CONSTANT long CF_NOSIZESEL=4194304
CONSTANT long CF_SELECTSCRIPT=8388608
CONSTANT long CF_NOSCRIPTSEL=16777216
CONSTANT long CF_NOVERTFONTS=33554432
//font type constant
CONSTANT integer BOLD_FONTTYPE=256
CONSTANT integer ITALIC_FONTTYPE=512
CONSTANT integer REGULAR_FONTTYPE=1024
CONSTANT integer SCREEN_FONTTYPE=8192
CONSTANT integer PRINTER_FONTTYPE=16384
CONSTANT integer SIMULATED_FONTTYPE=32768
//object private members constant
Private:
CONSTANT integer LMEM_ZEROINIT=64//memory CONSTANT

End the variables

CodePudding user response:

Forward as
The public function integer wf_center ()
End as
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related