Solved

SetClipboardData

Posted on 1998-09-24
3
171 Views
Last Modified: 2012-06-27
I can't seem to pass the 2nd parameter of this API. Does anyone have an example.
0
Comment
Question by:QAX
  • 2
3 Comments
 
LVL 2

Expert Comment

by:swilt
ID: 1436440
If your in VB why not use clipboard.SetData or clipboard.SetText ?
0
 
LVL 8

Accepted Solution

by:
Answers2000 earned 50 total points
ID: 1436441
What's the first param in your app ?

Second param is a handle to the data-type, for example if using CF_TEXT, handle to a block of ram allocated with GlobalAlloc (block of ram must contain nul terminated text in ASCII)

e.g.
handle = GlobalAlloc
GlobalLock
Fill in memory
GlobalUnlock

SetClipboardData( CF_TEXT, handle ) ;

If passing a bitmap it's the HBITMAP handle (CF_BITMAP) etc.
0
 
LVL 8

Expert Comment

by:Answers2000
ID: 1436442
Oops that should have been a comment
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now