DO decl
LOCAL lcBuffer, lnResult, hFormat, ii, lcName
#DEFINE cmBufsize 250
* registering a new format
hFormat = RegisterClipboardFormat ("NewlyRegisteredFormat")
? "New format registered:", hFormat
CREATE CURSOR csResult (id N(6), name C(250))
* Registered clipboard formats are identified by values
* in the range 0xC000 through 0xFFFF
FOR ii=49152 TO 65535
lcBuffer = Repli(Chr(0), cmBufsize)
lnResult = GetClipboardFormatName (ii, @lcBuffer, cmBufsize)
IF lnResult <> 0
lcName = Left(lcBuffer, lnResult)
INSERT INTO csResult VALUES (ii, lcName)
ENDIF
ENDFOR
IF hFormat <> 0
LOCATE ALL FOR id = hFormat
ELSE
GO TOP
ENDIF
BROWSE NORMAL NOWAIT
PROCEDURE decl
DECLARE INTEGER GetClipboardFormatName IN user32;
INTEGER format, STRING @lpszFormatName,;
INTEGER cchMaxCount
DECLARE INTEGER RegisterClipboardFormat IN user32;
STRING lpszFormat
|