> In any case the problem is > that I was not able to find a way to get the actual format in > it's string > form. I was only able to read the list of formats and get > their integer aliases.
If you open up the windows help file (D7), MSDN is fine as well but I prefer to start with the help file, and look up "clipboard" you'll find 14 general entries for "Clipboard XXXX." Usually I'm just looking for an API function reference so choose, "Clipboard Functions." You'll get a list of ALL the clipboard functions in the API. One of them is named GetClipboardFormatName(). Robert, is that not so straight-forward, it's almost scary? > So in order to set the format correctly for reading from and > writing to the clipboard I needed a way to convert from the > integer value to the string constant! Actually, to Read from or Write to the clipboard all you need is the format ID, a number. Since I've been following along, maybe you mean in order for your program to "reload" the clipboard, then yes, maybe you'll need more than just the format ID. I guess it depends on whether this is days and reboots later and whether or not that format has been registered. Keep in mind, depending on what exactly you're trying to do, you may be able to count on the fact that every format you pull off the clipboard is still a registered format when you want to put it back and your job would be simplier as you'd not need to worry about whether a format's registered or not. But only you can make that call. But what do you mean by "string constant?" Do you mean the format's name? I mentioned using GetClipboardFormatName() in my first message so maybe I can assume this is NOT what you're looking for. Then, I just don't know how to interpret what you've said. There is no common connection between a format ID and a common string constant. The program registering the format provides a string name for the format. But that doesn't seem to be what you want. What can one say -- Read the help. > So I thought I could load a list with a set of > name=value pairs I could use to programmatically lookup these > conversions. Again, I wouldn't call them conversions but yes, there's a name and a format id for each registered format. Saving both of these pieces of data might be helpful but it depends more precisely on what you're doing. Either way, if you attempt to "reload" the clipboard you are going to have to insure the format is registered, to insure it's registered you're going to make at least one additional call. You can call GetClipboardFormatName() and pass it a string buffer and your saved ID and see if you get a string that matches your saved format name OR wouldn't it just be easier to call RegisterClipboardFormat() with your saved format name. Then, if you did save the ID and need to know if the format was already registered, you could simply compare the returned ID to what you hold. Where's the pointer problem in all this? :) Regards, ------------------------------------------------------------------------ Jim Burns, <mailto:[EMAIL PROTECTED]> Technology Dynamics Pearland, Texas USA 281 485-0410 / 281 813-6939 _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

