Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > Reading the clipboard
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 25th June 17:47
ciarán Ó duibhín
External User
 
Posts: 1
Default Reading the clipboard



This piece of code, taken from a help file, shows how many "formats" are on
the clipboard and what they are:

ShowMessage ('No of clipboard formats: ' + IntToStr
(ClipBoard.FormatCount));
for i := 0 to ClipBoard.FormatCount-1 do
ShowMessage (IntToStr(ClipBoard.Formats[i]))
end;

The trouble is that the values returned in the ClipBoard.Formats array are
just integers. The meanings of some of them can be found in the Delphi 5
source (windows.pas), e.g. 1 = CF_TEXT, 7 = CF_OEMTEXT, etc, but some of the
values I am getting are in the range 50000-60000 and I can find no
explanation of them. (I am working with a clipboard containing material
copied from within Word 2000, and I am using Win95.)

Thanks for any ideas,
Ciarán Ó Duibhín.
  Reply With Quote


  sponsored links


2 25th June 17:47
maarten wiltink
External User
 
Posts: 1
Default Reading the clipboard



Applications can register their own clipboard formats, if I am not
mistaken. Office applications probably do so extensively, in the
interest of integration (with other Office applications, obviously).
It may or may not be do***ented how those formats work. But I bet
Google knows anyway. Don't forget to search for hex values, too.

Groetjes,
Maarten Wiltink
  Reply With Quote
3 25th June 17:47
jamie
External User
 
Posts: 1
Default Reading the clipboard


Registered clipboard formats are identified by values in the range
0xC000 through 0xFFFF.
This only means that what your getting is custom clipboard formats
made by apps that are most likely communicating with each other in some
way that they understand.
Packages like Office for WIndows, Corel etc...
  Reply With Quote
4 25th June 17:48
ciarán Ó duibhín
External User
 
Posts: 1
Default Reading the clipboard


Thanks for both replies.

I also found a procedure called GetClipboardFormatName, which supplies names
for the registered formats, i.e. the ones with values around 50000. It does
seem that these registered formats will not be of any use to me in
programming, and I can ignore them.

Ciarán Ó Duibhín.
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666