[fpc-pascal] GetClipboardFormatName causing an Error 216
Martin Frb
lazarus at mfriebe.de
Thu Dec 31 01:50:49 CET 2020
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....
More information about the fpc-pascal
mailing list