Solved

SetClipboardData

Posted on 1998-09-24
3
169 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
Comment Utility
If your in VB why not use clipboard.SetData or clipboard.SetText ?
0
 
LVL 8

Accepted Solution

by:
Answers2000 earned 50 total points
Comment Utility
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
Comment Utility
Oops that should have been a comment
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

762 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

13 Experts available now in Live!

Get 1:1 Help Now