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

lpXform
[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.
Usage:
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  
FreeTranslation.com 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: 10
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.91.171.137)
14 sec.Function: 'CeCreateFile'
30 sec.
Function group: 'HTTP Functions (WinHTTP)'
45 sec.Function: 'GdipCreateFont'
1.02 min.Function: 'PathYetAnotherMakeUniqueName'
1.23 min.
Function group: 'Region'
1.48 min.Function: 'sndPlaySound'
1.72 min.Function: 'SetSearchPathMode'
1.97 min.Function: 'GetNamedSecurityInfo'
2.18 min.Function: 'SQLGetInstalledDrivers'
Google
Advertise here!