Hi all,
I am trying to use the WinAPI function
GetCharacterPlacement which is defined as:
DWORD GetCharacterPlacement(
HDC
hdc,
// handle to device context
LPCTSTR lpString, // pointer to string
int nCount, // number of characters in string
int nMaxExtent, // maximum extent for displayed string
LPGCP_RESULTS *lpResults, // pointer to buffer for placement result
DWORD dwFlags // placement flags
);
LPCTSTR lpString, // pointer to string
int nCount, // number of characters in string
int nMaxExtent, // maximum extent for displayed string
LPGCP_RESULTS *lpResults, // pointer to buffer for placement result
DWORD dwFlags // placement flags
);
I noticed that it seems to be incorrectly imported
in the Windows.pas unit so I have redeclared it as follows:
{$EXTERNALSYM GetCharacterPlacement}
function GetCharacterPlacement(DC: HDC; p2: PChar; p3, p4: Integer;
p5: PGCPResults; p6: DWORD): DWORD; stdcall;
function GetCharacterPlacement(DC: HDC; p2: PChar; p3, p4: Integer;
p5: PGCPResults; p6: DWORD): DWORD; stdcall;
I am calling this but it is failing and the
getlasterror method returns 87 (invalid parameter).
I am setting the PGCPResults parameter to basically
an empty structure (apart from the lStructSize element). I'm after the
lpCaretPos information and have tried calling the routine with this element of
the record set to point to an array of integer but still the same
result.
Can anyone offer any insights? Have you used this
before?
Cheers,
Phil.
_______________________________________________ Delphi mailing list [EMAIL PROTECTED] http://ns3.123.co.nz/mailman/listinfo/delphi
