mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-19 00:09:26 +02:00
* Empty CF_TEXT clipboard data for go32v2 to force data conversion
if CF_TEXT is requested * Use OemToCharBuff to also set the CF_TEXT clipboard format on win32
This commit is contained in:
parent
9b70b46975
commit
2f3ddd8e6a
@ -198,6 +198,7 @@ var
|
|||||||
{$ifdef win32}
|
{$ifdef win32}
|
||||||
h : HGlobal;
|
h : HGlobal;
|
||||||
pp : pchar;
|
pp : pchar;
|
||||||
|
res : boolean;
|
||||||
{$endif win32}
|
{$endif win32}
|
||||||
begin
|
begin
|
||||||
SetTextWinClipBoardData:=False;
|
SetTextWinClipBoardData:=False;
|
||||||
@ -217,6 +218,13 @@ begin
|
|||||||
r.cx:=l and $ffff;
|
r.cx:=l and $ffff;
|
||||||
RealIntr($2F,r);
|
RealIntr($2F,r);
|
||||||
SetTextWinClipBoardData:=(r.ax<>0);
|
SetTextWinClipBoardData:=(r.ax<>0);
|
||||||
|
r.ax:=$1703;
|
||||||
|
r.dx:=1{ Empty Text };
|
||||||
|
r.es:=M.DosSeg;
|
||||||
|
r.bx:=M.DosOfs;
|
||||||
|
r.si:=0;
|
||||||
|
r.cx:=0;
|
||||||
|
RealIntr($2F,r);
|
||||||
FreeDosMem(M);
|
FreeDosMem(M);
|
||||||
{$endif DOS}
|
{$endif DOS}
|
||||||
{$ifdef win32}
|
{$ifdef win32}
|
||||||
@ -224,7 +232,13 @@ begin
|
|||||||
pp:=pchar(GlobalLock(h));
|
pp:=pchar(GlobalLock(h));
|
||||||
move(p^,pp^,l+1);
|
move(p^,pp^,l+1);
|
||||||
GlobalUnlock(h);
|
GlobalUnlock(h);
|
||||||
SetTextWinClipBoardData:=(SetClipboardData(CF_OEMTEXT,h)=h);
|
res:=(SetClipboardData(CF_OEMTEXT,h)=h);
|
||||||
|
h:=GlobalAlloc(GMEM_MOVEABLE or GMEM_DDESHARE,l+1);
|
||||||
|
pp:=pchar(GlobalLock(h));
|
||||||
|
OemToCharBuff(p,pp,l+1);
|
||||||
|
SetClipboardData(CF_TEXT,h);
|
||||||
|
GlobalUnlock(h);
|
||||||
|
SetTextWinClipBoardData:=res;
|
||||||
{$endif win32}
|
{$endif win32}
|
||||||
CloseWinClipBoard;
|
CloseWinClipBoard;
|
||||||
end;
|
end;
|
||||||
@ -234,7 +248,12 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.1 2001-08-04 11:30:26 peter
|
Revision 1.2 2001-10-05 11:59:06 pierre
|
||||||
|
* Empty CF_TEXT clipboard data for go32v2 to force data conversion
|
||||||
|
if CF_TEXT is requested
|
||||||
|
* Use OemToCharBuff to also set the CF_TEXT clipboard format on win32
|
||||||
|
|
||||||
|
Revision 1.1 2001/08/04 11:30:26 peter
|
||||||
* ide works now with both compiler versions
|
* ide works now with both compiler versions
|
||||||
|
|
||||||
Revision 1.1.2.1 2000/12/01 11:35:01 pierre
|
Revision 1.1.2.1 2000/12/01 11:35:01 pierre
|
||||||
|
Loading…
Reference in New Issue
Block a user