Using Win32 functions in Visual FoxPro Image Gallery
Font and Text
..msdn
CreateFont
DrawText
GetCharABCWidths
GetTextAlign
GetTextCharacterExtra
GetTextColor
GetTextExtentPoint32
GetTextFace
GetTextMetrics
SetTextAlign
SetTextCharacterExtra
SetTextColor
TextOut
Code examples:
Creating a clipping region from the path selected into the device context of a form
How to change the name and the size of the font in the MessageBox dialog
How to put a horizontal text scrolling on the form (a news line, marquee)
Placing On-screen Alert on top of all windows
Printing text on the main VFP window
Printing text with the Escape function
Splash Screen for the VFP application
Subclassing CommandButton control to create BackColor property
Using Common Controls: the Header Control
Vertical Label control
CreateFont
..msdn    Add comment     W32 Constants      Translate this page
Creates a logical font with the specified characteristics. The logical font can subsequently be selected as the font for any device.
Code examples:
Creating a clipping region from the path selected into the device context of a form
Splash Screen for the VFP application
How to put a horizontal text scrolling on the form (a news line, marquee)
How to change the name and the size of the font in the MessageBox dialog
Placing On-screen Alert on top of all windows
Using Common Controls: the Header Control
Printing text on the main VFP window
Subclassing CommandButton control to create BackColor property
Vertical Label control
Printing text with the Escape function
Declaration:
HFONT CreateFont(
  int nHeight,               // height of font
  int nWidth,                // average character width
  int nEscapement,           // angle of escapement
  int nOrientation,          // base-line orientation angle
  int fnWeight,              // font weight
  DWORD fdwItalic,           // italic attribute option
  DWORD fdwUnderline,        // underline attribute option
  DWORD fdwStrikeOut,        // strikeout attribute option
  DWORD fdwCharSet,          // character set identifier
  DWORD fdwOutputPrecision,  // output precision
  DWORD fdwClipPrecision,    // clipping precision
  DWORD fdwQuality,          // output quality
  DWORD fdwPitchAndFamily,   // pitch and family
  LPCTSTR lpszFace           // typeface name
);
FoxPro declaration:
DECLARE INTEGER CreateFont IN gdi32;
    INTEGER nHeight,;
    INTEGER nWidth,;
    INTEGER nEscapement,;
    INTEGER nOrientation,;
    INTEGER fnWeight,;
    INTEGER fdwItalic,;
    INTEGER fdwUnderline,;
    INTEGER fdwStrikeOut,;
    INTEGER fdwCharSet,;
    INTEGER fdwOutputPrecision,;
    INTEGER fdwClipPrecision,;
    INTEGER fdwQuality,;
    INTEGER fdwPitchAndFamily,;
    STRING  lpszFace

Parameters:
nHeight
[in] Specifies the height, in logical units, of the font"s character cell or character.

nWidth
[in] Specifies the average width, in logical units, of characters in the requested font.

nEscapement
[in] Specifies the angle, in tenths of degrees, between the escapement vector and the x-axis of the device.

nOrientation
[in] Specifies the angle, in tenths of degrees, between each character"s base line and the x-axis of the device.

fnWeight
[in] Specifies the weight of the font in the range 0 through 1000.

fdwItalic
[in] Specifies an italic font if set to TRUE.

fdwUnderline
[in] Specifies an underlined font if set to TRUE.

fdwStrikeOut
[in] Specifies a strikeout font if set to TRUE.

fdwCharSet
[in] Specifies the character set.

fdwOutputPrecision
[in] Specifies the output precision.

fdwClipPrecision
[in] Specifies the clipping precision.

fdwQuality
[in] Specifies the output quality.

fdwPitchAndFamily
[in] Specifies the pitch and family of the font.

lpszFace
[in] Pointer to a null-terminated string that specifies the typeface name of the font.
Return value:
If the function succeeds, the return value is a handle to a logical font. If the function fails, the return value is NULL.
My comment:
Created handle to the font can be passed to a device context using the SelectObject function. To delete a font use DeleteObject function, before your program ends.
Word Index links for the CreateFont :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2001-09-11 12:00:00
Modified: 2001-11-26 16:03:37
Visited in last 7 days: 65
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2014 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.1.68), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.204.134.183)
3 sec.Example: 'Obtaining I/O counts for the current process'
6 sec.Function: 'JetCommitTransaction'
Function group: 'Extensible Storage Engine (ESE, Jet Blue)'
9 sec.Example: 'How to display Windows On-Screen Keyboard'
Language: 'C++'
12 sec.
Function group: 'Windows Sockets 2 (Winsock)'
15 sec.Example: 'Validating the heap of the calling process'
20 sec.
Function group: 'Process and Thread'
3 day(s)Example: 'Using Video Capture: displaying on FoxPro form frames and previewing video obtained from a digital camera'
Google
Advertise here!