Using Win32 functions in Visual FoxPro Image Gallery
GDI+ Text
..msdn
GdipDrawString
GdipMeasureString
Code examples:
Custom GDI+ class
GdipDrawString
..msdn    Add comment     W32 Constants      Translate this page
Draws a string based on a font, a layout rectangle, and a format
Code examples:
Custom GDI+ class
Declaration:
GpStatus WINGDIPAPI GdipDrawString(
    GpGraphics *graphics,
    GDIPCONST WCHAR *string,
    INT length,
    GDIPCONST GpFont *font,
    GDIPCONST RectF *layoutRect,
    GDIPCONST GpStringFormat *stringFormat,
    GDIPCONST GpBrush *brush
)

FoxPro declaration:
DECLARE INTEGER GdipDrawString IN gdiplus;
    INTEGER   graphics,;
    STRING    widechar,;
    INTEGER   length,;
    INTEGER   fnt,;
    STRING  @ rectf,;
    INTEGER   stringFormat,;
    INTEGER   brush
Parameters:
graphics
[in] Pointer to a Graphics object.

string
[in] Pointer to a wide-character string to be drawn.

length
[in] Integer that specifies the number of characters in the string array. The length parameter can be set to 1 if the string is null terminated.

font
[in] Pointer to a Font object that specifies the font attributes (the family name, the size, and the style of the font) to use.

layoutRect
[in] Reference to a rectangle (of floats) that bounds the string.

stringFormat
[in] Pointer to a StringFormat object that specifies text layout information and display manipulations to be applied to the string.

brush
[in] Pointer to a Brush object that is used to fill the string.
Return value:
If the method succeeds, it returns Ok (0), which is an element of the Status enumeration.
My comment:
Note that the layoutRect structure contains four 32-bit float numbers, not four 32-bit INT numbers.

Presented in this reference GDI+ class uses float2int conversion routine to populate this structure:
FUNCTION RECTF(nLeft, nTop, nRight, nBottom)
RETURN num2dword(Int2Float(nLeft)) + num2dword(Int2Float(nTop)) +;
        num2dword(Int2Float(nRight)) + num2dword(Int2Float(nBottom))
Word Index links for the GdipDrawString :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2004-07-26 17:29:32
Modified: 2004-07-26 17:39:07
Visited in last 7 days: 15
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 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.6.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.81.178.153)
5 sec.Function: 'CeRegEnumKeyEx'
12 sec.Function: 'CreateCompatibleBitmap'
17 sec.Function: 'DragQueryFile'
24 sec.Function: 'AVIStreamStart'
30 sec.Function: 'FtpPutFile'
36 sec.
Function group: 'Performance Monitoring'
42 sec.
Function group: 'Menu'
52 sec.Function: 'CompareString'
58 sec.Function: 'AVIFileGetStream'
1.07 min.Function: 'CeSetFilePointer'
Google
Advertise here!