English
Source / code snippets

inquire Choose-Dialog create Fonts

 

CompileMarkSeparation
Source wurde am 15.07.2007 aus der MMJ-Quellcodesammlung (Dietmar Horn) in die Babyklappe auf XProfan.Com abgelegt:
'Schriftarten-Auswahldialog erstellen und abfragen (2)
'(C) 2006 Andreas Hötker
'-Begin-----------------------------------------------------------------
'-ExternalFunctions---------------------------------------------------
Def @ChooseFont(1) !"COMDLG32.DLL", "ChooseFontA"
'-StructuresDefinition------------------------------------------------
Declare CHOOSEFONT#
Struct CHOOSEFONT = lStructSize&,
hWndOwner&,
hDC&,
lpLogFont&,
iPointSize&,
Flags&,
rgbColors&,
lCustData&,
lpfnHook&,
lpTemplateName&,
hInstance&,
lpszStyle&,
nFontType%,
Alignment%,
nSizeMin&,
nSizeMax&
Dim CHOOSEFONT#, CHOOSEFONT
Declare LOGFONT#
Struct LOGFONT = lfHeight&,
lfWidth&,
lfEscapement&,
lfOrientation&,
lfWeight&,
lfItalic#(1),
lfUnderline#(1),
lfStrikeOut#(1),
lfCharSet#(1),
lfOutPrecision#(1),
lfClipPrecision#(1),
lfQuality#(1),
lfPitchAndFamily#(1),
lfFaceName#(32)
Dim LOGFONT#, LOGFONT
'-ConstantsDefinition-------------------------------------------------
Def &CF_BOTH $3
Def &CF_EFFECTS $100
Def &CF_INITTOLOGFONTSTRUCT $40
Def &CF_LIMITSIZE $2000
Def &CF_PRINTERFONTS $2
Def &CF_SCREENFONTS $1
Def &CF_TTONLY $40000
'-Main----------------------------------------------------------------
LOGFONT#.lfHeight& = 1000/75
String LOGFONT#, 28 = "Arial" + @Chr$(0)

With CHOOSEFONT#

    .lStructSize& = @SizeOf(CHOOSEFONT#)
    .hWndOwner& = 0
    .lpLogFont& = LOGFONT#
    .Flags& = &CF_BOTH | &CF_TTONLY | &CF_INITTOLOGFONTSTRUCT |
    &CF_LIMITSIZE | &CF_EFFECTS
    .rgbColors& = @RGB(255, 0, 0)
    .nSizeMin& = 10
    .nSizeMax& = 14

EndWith

@ChooseFont(CHOOSEFONT#)
Window 100, 100 - 450, 300
Print "Schriftart " + @String$(LOGFONT#, 28) + " gewählt"
Print "mit einer Höhe von " + @Str$(CHOOSEFONT#.iPointSize& / 10)

If @or(CHOOSEFONT#.nFontType%,$100)=CHOOSEFONT#.nFontType%

    Print "fett"

endif

If @or(CHOOSEFONT#.nFontType%,$200)=CHOOSEFONT#.nFontType%

    Print "kursiv"

endif

If @Byte(LOGFONT#,21)=1

    Print "unterstrichen"

endif

If @Byte(LOGFONT#,22)=1

    Print "durchgestrichen"

endif

WaitKey
Dispose LOGFONT#
Dispose CHOOSEFONT#
'-End-------------------------------------------
------------------ End
 
07/16/07  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

3.694 Views

Untitledvor 0 min.
RICOSCH10/14/16
GDL12/18/15
Energizer08/25/13
Untitled02/25/12
More...

Themeninformationen

this Topic has 1 subscriber:

unbekannt (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie