|
Const {Format
du Presse-Papier Windows} cfText=1;
{ Texte } cfBitmap=2;
{ Bitmap OEM } cfOemText=7;
{ Texte OEM } cfDspText=$81;
{ Format texte } cfDspBitmap=$82;
{ Format dessin }
{ Description ------------ Cette
fonction indique si les outils du presse-papier sont disponibles
pour l'application DOS. }
Function
ClipboardFunctionsAvailable:Boolean;Assembler;ASM MOV
AX,1700h INT
2Fh XOR
BL,BL CMP
AX,1700h JE
@1 MOV BL,1 @1: XCHG
AX,BX END;
Function
ClipboardCompact(lDesired:LongInt):LongInt;Assembler;ASM MOV
AX,1709h LES
CX,lDesired MOV
SI,ES INT
2Fh END;
{
Description ------------ Cette
fonction permet d'effectuer la fermeture (terminaison du
processus de lecture) du presse-papier précédemment
préparer par «OpenClipboard». }
Function
CloseClipboard:Boolean;Assembler;ASM MOV
AX,1708h INT
2Fh OR
AX,AX JE
@End MOV AL,1 @End: END;
{ Description ------------ Cette
fonction permet de savoir si le presse-papier est actuellement
vide et sans aucun contenu. }
Function
EmptyClipboard:Boolean;Assembler;ASM MOV
AX,1702h INT
2Fh OR
AX,AX JE
@End MOV AL,1 @End: END;
{ Description ------------ Cette
fonction retourne la taille du presse-papier en fonction du
format spécifier (cf????). }
Function
GetClipboardDataSize(wFormat:Word):LongInt;Assembler;ASM MOV
AX,1704h MOV
DX,wFormat INT
2Fh END;
{
Description ------------ Cette fonction renvoie les
informations contenu dans le presse-papier et indique si
l'opération c'est bien déroulée. }
Function
GetClipboardData(wFormat:Word;DataPtr:Pointer):Boolean;Assembler;ASM MOV
AX,1705h MOV
DX,wFormat LES
BX,DataPtr INT
2Fh OR
AX,AX JE
@End MOV AL,1 @End: END;
{ Description ------------ Cette
fonction permet d'effectuer l'ouverture du presse-papier afin
d'éventuellement lire le contenu de celui-ci. }
Function
OpenClipboard:Boolean;Assembler;ASM MOV
AX,1701h INT
2Fh OR
AX,AX JE
@End MOV AL,1 @End: END;
{ Description ------------ Cette
fonction permet de fixer le contenu du presse-papier avec le
format spécifié. }
Function
SetClipboardData(wFormat:Word;DataPtr:Pointer;lSize:LongInt):Boolean;Begin SetClipboardData:=False; If(DataPtr<>Nil)and(lSize<>0)and(ClipboardCompact(lSize)>=lSize)Then
Begin ASM MOV
AX,1703h MOV
DX,wFormat LES
CX,lSize MOV
SI,ES LES
BX,DataPtr INT
2Fh OR
AX,AX JE
@End MOV
AL,1 @End: MOV
@Result,AL END; End; End;
|