www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Clipboard Tinkering - clipboard.d

reply Kevin Laborda <Kevin_member pathlink.com> writes:
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?


begin 0644 clipboard.d
M:6UP;W)T('-T9"YS=&1I;SL-"FEM<&]R="!S=&0N8RYW:6YD;W=S+G=I;F1O


M*3L-"F5X=&5R;B`H5VEN9&]W<RD 2$%.1$Q%(%-E=$-L:7!B;V%R9$1A=&$ 








M12!H4')E=DEN<W1A;F-E+`E,4%-44B!L<$-M9$QI;F4L"6EN="!N0VUD4VAO
M=RD-"GL-" EC:&%R6UT <W1R:6YG(#T (E1H:7, :7, 9F]R('1H92!C;&EP




`
end
Jul 08 2006
next sibling parent "Andrew Fedoniouk" <news terrainformatica.com> writes:
"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
Jul 08 2006
prev sibling parent reply Stewart Gordon <smjg_1998 yahoo.com> writes:
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.
Jul 11 2006
parent Stewart Gordon <smjg_1998 yahoo.com> writes:
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.
Jul 11 2006