---xxx---
' Logical Font
Public Const LF_FACESIZE = 32
Type LOGFONT
lfHeight As Long
lfWidth As Long
lfEscapement As Long
lfOrientation As Long
lfWeight As Long
lfItalic As Byte
lfUnderline As Byte
lfStrikeOut As Byte
lfCharSet As Byte
lfOutPrecision As Byte
lfClipPrecision As Byte
lfQuality As Byte
lfPitchAndFamily As Byte
lfFaceName(LF_FACESIZE) As Byte
End Type
Type CHOOSEFONT
lStructSize As Long
hwndOwner As Long ' caller's window handle
hdc As Long ' printer DC/IC or NULL
lpLogFont As LOGFONT ' ptr. to a LOGFONT struct
iPointSize As Long ' 10 * size in points of selected
font
flags As Long ' enum. type flags
rgbColors As Long ' returned text color
lCustData As Long ' data passed to hook fn.
lpfnHook As Long ' ptr. to hook function
lpTemplateName As String ' custom template name
hInstance As Long ' instance handle of.EXE that
' contains cust. dlg. template
lpszStyle As String ' return the style field here
' must be LF_FACESIZE or bigger
nFontType As Integer ' same value reported to the
EnumFonts
' call back with the extra
FONTTYPE_
' bits added
MISSING_ALIGNMENT As Integer
nSizeMin As Long ' minimum pt size allowed &
nSizeMax As Long ' max pt size allowed if
' CF_LIMITSIZE is used
End Type
Declare Function ChooseFont Lib "comdlg32.dll" Alias "ChooseFontA"
(pChoosefont As CHOOSEFONT) As Long
---xxx---
I think that the 'lpTemplateName' and 'lpszStyle' should be Long (a
pointer to a string)
This is from the help about the CHOOSEFONT structure:
---xxx---
lpTemplateName
Points to a null-terminated string that names the dialog box template
resource to be substituted for the standard dialog box template. An
application can use the MAKEINTRESOURCE macro for numbered dialog box
resources. This member is used only if the Flags member specifies the
CF_ENABLETEMPLATE flag; otherwise, this member is ignored.
lpszStyle
Points to a buffer that contains style data. If the CF_USESTYLE flag is
set, that ChooseFont uses the data in this buffer to initialize the
style control. When the user closes the dialog box, that copies the
string in the style control into this buffer.
---xxx---
Saludos.
Guillermo
Quote:
> Hi there,
> has got anybody there a functional definition of the "ChooseFont" struct
> size? I tried a lot and ether I got a CDERR_STRUCTSIZE of an GPF.
> Can somebody help?
> Thanks, Torsten
--
============================================
Te invito a visitar mis pginas sobre
Visual Basic, HTML (
VBScript, JavaScript...)
http://www.wcostasol.es/guiller/
Y la traduccin de VB Online en espa?ol:
http://www.wcostasol.es/vbonline/
============================================
quita el ~ para enviar el correo.
============================================