Using the Clipboard under Windows

Hello, is there some sample code on how to use the Graphics.Win32.GDI.Clip? Günther

2010/4/29 Günther Schmidt
Hello,
is there some sample code on how to use the Graphics.Win32.GDI.Clip?
That part of the library is fairly low level and has a mostly one-to-one correspondence to the C API. This means that you should be able to more or less read an example of how to do it in C and just translate that to the functions you see in Graphics.Win32.GDI.Clip. In other words, try this example: http://www.codeproject.com/KB/clipboard/archerclipboard1.aspx Now, on a stylistic note, I think most people who do Win32 programming avoid directly using GDI. It's older, low level, and sort of "primitive". So, usually you'd use a different library that wraps around GDI. At least, that seemed to be the case when I last looked for resources about GDI programming. Perhaps it doesn't apply universally (my example usage was with fonts). Jason

Dear Jason, I'd be happy not having to dig in deeply. Do you happen to know a "higher" level one? I really do not need more than the clipboard stuff, everything GUI-related I'm using wxHaskell for. Günther Am 30.04.10 01:54, schrieb Jason Dagit:
2010/4/29 Günther Schmidt
mailto:gue.schmidt@web.de> Hello,
is there some sample code on how to use the Graphics.Win32.GDI.Clip?
That part of the library is fairly low level and has a mostly one-to-one correspondence to the C API. This means that you should be able to more or less read an example of how to do it in C and just translate that to the functions you see in Graphics.Win32.GDI.Clip.
In other words, try this example: http://www.codeproject.com/KB/clipboard/archerclipboard1.aspx
Now, on a stylistic note, I think most people who do Win32 programming avoid directly using GDI. It's older, low level, and sort of "primitive". So, usually you'd use a different library that wraps around GDI. At least, that seemed to be the case when I last looked for resources about GDI programming. Perhaps it doesn't apply universally (my example usage was with fonts).
Jason

2010/4/29 Günther Schmidt
Dear Jason,
I'd be happy not having to dig in deeply. Do you happen to know a "higher" level one?
Sorry, I don't. The only thing I used GDI for was rendering fonts with transparency when I worked for a company that did some very special font applications. It was one use over about a week or two. I really just scratched the surface. In .NET also.
I really do not need more than the clipboard stuff, everything GUI-related I'm using wxHaskell for.
As far as I can tell from google wxwidgets does have clipboard support. Perhaps wxHaskell can do it or needs to be extended? Jason

On Fri, 30 Apr 2010 08:21:11 +0300, Jason Dagit
As far as I can tell from google wxwidgets does have clipboard support. Perhaps wxHaskell can do it or needs to be extended?
Jason
I searched with Hayoo for clipboard wx and found Graphics.UI.WXCore.Controls.execClipBoardData [1]; following links, I found a set of clipboard functions [2]. Regards, Henk-Jan van Tuyl [1] http://hackage.haskell.org/packages/archive/wxcore/latest/doc/html/Graphics-... [2] http://hackage.haskell.org/packages/archive/wxcore/latest/doc/html/Graphics-... -- http://Van.Tuyl.eu/ http://members.chello.nl/hjgtuyl/tourdemonad.html --

Hello all, the application from which I wish to copy (text) data to the clipboard is not a GUI app, it's more of a simple test-script. So I'd like to do it without having to install wxHaskell. I guess I'll just have to bite my way through the Win32 API. Right now I'm dumping the text output to a file and copy & paste from there. Günther Am 30.04.10 11:19, schrieb Henk-Jan van Tuyl:
On Fri, 30 Apr 2010 08:21:11 +0300, Jason Dagit
wrote: As far as I can tell from google wxwidgets does have clipboard support. Perhaps wxHaskell can do it or needs to be extended?
Jason
I searched with Hayoo for clipboard wx and found Graphics.UI.WXCore.Controls.execClipBoardData [1]; following links, I found a set of clipboard functions [2].
Regards, Henk-Jan van Tuyl
[1] http://hackage.haskell.org/packages/archive/wxcore/latest/doc/html/Graphics-...
[2] http://hackage.haskell.org/packages/archive/wxcore/latest/doc/html/Graphics-...
-- http://Van.Tuyl.eu/ http://members.chello.nl/hjgtuyl/tourdemonad.html --
participants (3)
-
Günther Schmidt
-
Henk-Jan van Tuyl
-
Jason Dagit