[fpc-pascal] GetClipboardFormatName causing an Error 216

James Richters james.richters at productionautomation.net
Thu Dec 31 18:11:29 CET 2020


Thanks for the info on SynEdit.  Where can I find the synedit source related to the clipboard?
I think the link you indtended ater 'See the code at.' Didn't come though, can you pleaese send it again?

James


-----Original Message-----
From: fpc-pascal <fpc-pascal-bounces at lists.freepascal.org> On Behalf Of Martin Frb via fpc-pascal
Sent: Wednesday, December 30, 2020 7:51 PM
To: James Richters via fpc-pascal <fpc-pascal at lists.freepascal.org>
Cc: Martin Frb <lazarus at mfriebe.de>
Subject: Re: [fpc-pascal] GetClipboardFormatName causing an Error 216

On 31/12/2020 01:09, James Richters via fpc-pascal wrote:
> I'm trying to write a programs to get data from the windows clipboard 
> that was put into it with Notepad++ using vertical editing.
>
Just for Info, SynEdit (trunk) can handle notepad++ column selection

See the code at.
There are 2 common formats (and as a 3rd the one used by SynEdit).
NP++ uses one of them, not sure which.

components\synedit\syneditmiscclasses.pp
  TSynClipboardStream = class
     class function ClipboardFormatMSDEVColumnSelect: TClipboardFormat;
     class function ClipboardFormatBorlandIDEBlockType: TClipboardFormat;

IIRC in both cases the text is in the normal ClipBoard.AsText. Each line is one column segment.

'MSDEVColumnSelect' acts as a flag if present.
'Borland IDE Block Type' has a single byte. the value $02 indicates column mode.

Register the format, to get the ID, then check if it is on the clipboard.

Either check the synEdit source, or google the 2 format names....
_______________________________________________
fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal



More information about the fpc-pascal mailing list