?
Solved

SetClipboardData

Posted on 1998-09-24
3
Medium Priority
?
178 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 150 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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.
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 Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month14 days, 5 hours left to enroll

801 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