SetClipboardData

I can't seem to pass the 2nd parameter of this API. Does anyone have an example.
QAXAsked:
Who is Participating?
 
Answers2000Commented:
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
 
swiltCommented:
If your in VB why not use clipboard.SetData or clipboard.SetText ?
0
 
Answers2000Commented:
Oops that should have been a comment
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.