[Solved] C++ Issue | Copy into Clipboard - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Other (
https://sampforum.blast.hk/forumdisplay.php?fid=7)
+--- Forum: Everything and Nothing (
https://sampforum.blast.hk/forumdisplay.php?fid=23)
+--- Thread: [Solved] C++ Issue | Copy into Clipboard (
/showthread.php?tid=139857)
[Solved] C++ Issue | Copy into Clipboard -
DeathOnaStick - 06.04.2010
Hey.
I got a small issue: I'm working on a Cpp program and I'm wanting to copy a string into the clipboard, so that you can paste it manually by pressing ctrl+v. I know here are many good programers, so i hope i will get a sollution for this. i've been searching on ****** for a long time now, without success. Would be nice if anybody could tell me how it works.
Greetz, DeathOnaStick
Re: C++ Issue | Copy into Clipboard -
Westie - 06.04.2010
I presume you mean Windows, right? I've found a working example after two minutes of searching, just ****** for 'Win32 API Copy to Keyboard C++',
etc.
Re: C++ Issue | Copy into Clipboard -
DeathOnaStick - 06.04.2010
Sorry for that i didnt find it by myself, but i got an error anyway. I pasted the following code:
pawn Код:
HANDLE SetClipboardData(
__in UINT uFormat,
__in HANDLE hMem
);
And in line
it says:
Код:
parse error before "UFormat"
Sorry if im just stupid, but i dont become ideas out of this error. :/
Thanks so far.
#Edit#: Btw, if it matters, i'm using it as a console and not a windows-default-window.
Re: C++ Issue | Copy into Clipboard -
Killerkid - 06.04.2010
That's the syntax.
Here is a example that copies "Hello World!" to your clipboard:
http://pastebin.org/139168
Re: C++ Issue | Copy into Clipboard -
DeathOnaStick - 06.04.2010
Quote:
Originally Posted by Killerkid.
|
Thank you very much, this extremely helped me out!