Using Win32 functions in Visual FoxPro Image Gallery
Coordinate Space and Transformation
Code examples:
..msdn    Add comment     W32 Constants      Translate this page
Retrieves the current world-space to page-space transformation.
Code examples:
BOOL GetWorldTransform(
    HDC hdc,         // handle to device context
    LPXFORM lpXform  // transformation
FoxPro declaration:
DECLARE INTEGER GetWorldTransform IN gdi32;
    INTEGER hdc,;
    STRING @lpXform
[in] Handle to the device context.

[out] Pointer to an XFORM structure that receives the current world-space to page-space transformation.
Return value:
If the function succeeds, the return value is nonzero.
LOCAL hWindow, hDC, cBuffer
hWindow = _screen.HWnd
hDC = GetWindowDC(hWindow)

cBuffer = REPLICATE(CHR(0), 24)
= GetWorldTransform(m.hDC, @cBuffer)

* display XFORM members
? "eM11=", float2int(buf2dword(SUBSTR(cBuffer,1,4)))
? "eM12=", float2int(buf2dword(SUBSTR(cBuffer,5,4)))
? "eM21=", float2int(buf2dword(SUBSTR(cBuffer,9,4)))
? "eM22=", float2int(buf2dword(SUBSTR(cBuffer,13,4)))
? "eDx=", float2int(buf2dword(SUBSTR(cBuffer,17,4)))
? "eDy=", float2int(buf2dword(SUBSTR(cBuffer,21,4)))

= ReleaseDC(hWindow, hDC)
My comment:
Conversion function float2int is described in VFP Floating Point Data Type topic on FoxPro Wiki.

The SetWorldTransform function will fail unless the graphics mode for the given device context has been set to GM_ADVANCED by previously calling the SetGraphicsMode function.

See also: SetWorldTransform
Word Index links for the GetWorldTransform :
Translate this page:
  Spanish    Portuguese    German    French    Italian offers instant, free translations of text or web pages.
Created: 2007-04-30 13:32:17
Modified: 2007-06-11 16:30:01
Visited in last 7 days: 14
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 (
23 sec.Function: 'StrCmpC'
43 sec.Function: 'SetPrinter'
1.03 min.Function: 'GetUpdatedClipboardFormats'
1.33 min.Function: 'FindNextUrlCacheEntry'
1.67 min.Function: 'EnumProcesses'
1.98 min.Function: 'CertFreeCertificateContext'
2.33 min.Function: 'CeRapiInit'
2.65 min.Function: 'HeapWalk'
3.02 min.Function: 'GetSystemRegistryQuota'
3.37 min.Function: 'GetRegionData'
Advertise here!