Using Win32 functions in Visual FoxPro Image Gallery
GDI+ Text
Code examples:
Custom GDI+ class
..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
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
[in] Pointer to a Graphics object.

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

[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.

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

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

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

[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 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: 32
User Contributed Notes:
There are no notes on this subject.

Copyright 2001-2018 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.39), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (
16 sec.Function: 'LockFile'
35 sec.Function: 'LsaFreeMemory'
51 sec.
Function group: 'National Language Support'
1.17 min.
Function group: 'Window Procedure'
1.43 min.Function: 'IpRenewAddress'
1.7 min.Function: 'GlobalAlloc'
1.97 min.Function: 'CreateURLMonikerEx'
2.25 min.Function: 'NetShareEnum'
2.45 min.Function: 'GdipGetDpiX'
2.68 min.Function: 'LoadLibrary'
Advertise here!