Thread overview
Clipboard Tinkering - clipboard.d
Jul 08, 2006
Kevin Laborda
Jul 09, 2006
Andrew Fedoniouk
Jul 11, 2006
Stewart Gordon
Jul 11, 2006
Stewart Gordon
July 08, 2006
I'm working on a project of mine which does the following (don't ask why... it's
for a game):
1. Grabs an HTML page
2. Parses it with RegExp to obtain specific data.
3. Writes the data to a file.

Now, I want to add a feature which automatically sets the clipboard to this specific data.  The data is stored as-- char[] data.  I've attached some "code" which tries to set data to the clipboard (function from "Matthew").  Yet, OpenClipboard isn't working right, so I assume HWND needs to be set properly. This leads to my question:  how do I get HWND set properly so this will work?


July 09, 2006
"Kevin Laborda" <Kevin_member@pathlink.com> wrote in message news:e8onuu$161a$1@digitaldaemon.com...
> I'm working on a project of mine which does the following (don't ask
> why... it's
> for a game):
> 1. Grabs an HTML page
> 2. Parses it with RegExp to obtain specific data.
> 3. Writes the data to a file.
>
> Now, I want to add a feature which automatically sets the clipboard to
> this
> specific data.  The data is stored as-- char[] data.  I've attached some
> "code"
> which tries to set data to the clipboard (function from "Matthew").  Yet,
> OpenClipboard isn't working right, so I assume HWND needs to be set
> properly.
> This leads to my question:  how do I get HWND set properly so this will
> work?
>
>

You can use NULL as HWND in clipboard functions.

See:
module  harmonia.ui.exchange.clipboard;
module  harmonia.ui.native.win32exchange;

http://harmonia.terrainformatica.com







July 11, 2006
Kevin Laborda wrote:
> I'm working on a project of mine which does the following (don't ask why... it's
> for a game):
> 1. Grabs an HTML page
> 2. Parses it with RegExp to obtain specific data.
> 3. Writes the data to a file.
> 
> Now, I want to add a feature which automatically sets the clipboard to this
> specific data.  The data is stored as-- char[] data.  I've attached some "code"
> which tries to set data to the clipboard (function from "Matthew").  Yet,
> OpenClipboard isn't working right, so I assume HWND needs to be set properly.
> This leads to my question:  how do I get HWND set properly so this will work?

http://tinyurl.com/ghalp

The argument passed to OpenClipboard must be a handle of a window, not an application instance.  Since you have no window, just set it to null.

Stewart.
July 11, 2006
Stewart Gordon wrote:
<snip>
> http://tinyurl.com/ghalp
<snip>

I've just realised the link I've given you is for Windows CE!  (Has anyone managed to build GDC on WinCE, FTM?)  Still, here's the regular Win32 version, which is the same in this respect....

http://tinyurl.com/p6w6k

Stewart.