Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Clipboard operations

Reply
Thread Tools

Clipboard operations

 
 
Oliver Soeder
Guest
Posts: n/a
 
      07-19-2007
Hello together,

I want to write an application which copies the current date to the
clipboard. After that I will be able to insert it at the current cursor
position. If possible, the text should be inserted automatically at the
current cursor position.

Now I already solved that problem in PERL, but after creating a binary
from it, the code which had original 10 lines got a 2 MB .exe file.

I learned C++ 7 years ago in university and did not use it any more.

I need your help to show me, how I can do clipboard operations, I will
be able to solve the rest of the problems.


Thank you


Oliver
 
Reply With Quote
 
 
 
 
Victor Bazarov
Guest
Posts: n/a
 
      07-19-2007
Oliver Soeder wrote:
> [..]
> I need your help to show me, how I can do clipboard operations, I will
> be able to solve the rest of the problems.


There is no "clipboard" in C++. You need to ask your OS-specific
question in the newsgroup dedicated to your OS.


 
Reply With Quote
 
 
 
 
Oliver Soeder
Guest
Posts: n/a
 
      07-19-2007
Victor Bazarov schrieb:
> Oliver Soeder wrote:
>> [..]
>> I need your help to show me, how I can do clipboard operations, I will
>> be able to solve the rest of the problems.

>
> There is no "clipboard" in C++. You need to ask your OS-specific
> question in the newsgroup dedicated to your OS.
>
>

There is also no clipboard class? I even have it in Perl. I need it for
Windows.
 
Reply With Quote
 
Victor Bazarov
Guest
Posts: n/a
 
      07-19-2007
Oliver Soeder wrote:
> Victor Bazarov schrieb:
>> Oliver Soeder wrote:
>>> [..]
>>> I need your help to show me, how I can do clipboard operations, I
>>> will be able to solve the rest of the problems.

>>
>> There is no "clipboard" in C++. You need to ask your OS-specific
>> question in the newsgroup dedicated to your OS.
>>
>>

> There is also no clipboard class? I even have it in Perl. I need it
> for Windows.


Do I really need to repeat what I just posted to have you convinced?


 
Reply With Quote
 
John Harrison
Guest
Posts: n/a
 
      07-19-2007
Oliver Soeder wrote:
> Victor Bazarov schrieb:
>> Oliver Soeder wrote:
>>> [..]
>>> I need your help to show me, how I can do clipboard operations, I will
>>> be able to solve the rest of the problems.

>>
>> There is no "clipboard" in C++. You need to ask your OS-specific
>> question in the newsgroup dedicated to your OS.
>>

> There is also no clipboard class? I even have it in Perl. I need it for
> Windows.


There is a clipboard class in the C++ you are using (no doubt).

There is no clipboard class in *standard* C++, which is what we discuss
here. Follow Victor's advice.

John
 
Reply With Quote
 
James Kanze
Guest
Posts: n/a
 
      07-20-2007
On Jul 19, 9:14 pm, John Harrison <john_androni...@hotmail.com> wrote:
> Oliver Soeder wrote:
> > Victor Bazarov schrieb:
> >> Oliver Soeder wrote:
> >>> [..]
> >>> I need your help to show me, how I can do clipboard operations, I will
> >>> be able to solve the rest of the problems.


> >> There is no "clipboard" in C++. You need to ask your OS-specific
> >> question in the newsgroup dedicated to your OS.


> > There is also no clipboard class? I even have it in Perl. I need it for
> > Windows.


> There is a clipboard class in the C++ you are using (no doubt).


Are you sure? There isn't in any of the C++ I use under Unix.
(The C++, of course, allow access to the various X Windows
libraries, but those library API's are always in C, without any
classes. And they're not really part of C++, not even the
platform specific C++.)

> There is no clipboard class in *standard* C++, which is what
> we discuss here. Follow Victor's advice.


The word is "portable" C++, not standard C++. Or simply C++.
Unlike some other languages, C++ does not try to provide
everything; it provides the framework, but expects you to use
other libraries for all but the most basics. I'm sure
wxWidgets, for example, has a clipboard class, or Qt, or any
number of other windowing libraries. But not C++ per se.

This is a general philosophy of C++. It has some advantages;
you can find and choose a windowing library which corresponds to
your philosophy as to what a windowing library should be like
(which may not correspond to mine), for example. It also has
some disadvantages: the next C++ programmer you hire might not
know the library you're using.

--
James Kanze (GABI Software) email:
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Clipboard - Copy Image To Clipboard Mahsha Javascript 1 06-01-2009 05:06 PM
$clipboard = Gtk::Clipboard.get('PRIMARY')... under windows Dan Bishop Ruby 0 08-26-2008 01:47 PM
clipboard.setContents destroys clipboard.getContents? spunibard@gmail.com Java 2 03-02-2007 07:52 PM
Paste from clipboard when clipboard changes mid script melvynm@gmail.com Javascript 4 12-14-2004 10:59 PM
Using VB.Net or C#, utilizing the clipboard object, how to copy an MS Excel graphic from the clipboard to an image control and obtain its source reference TC ASP .Net 5 09-01-2004 04:49 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57