|
|
 | | From: | Heinz Kesting | | Subject: | Synatx: Extern EmptyClipboard | | Date: | Sat, 22 Jan 2005 00:32:44 +0100 |
|
|
 | Hallo, Can anybody help with the correct syntax for the API-function EmptyClipboard? I've tried various possibilites, like ...
extern clogical EmptyClipboard(cVoid) user32 EmptyClipboard()
but none succeeded ...
Thanks in advance, Heinz
|
|
 | | From: | David Stone | | Subject: | Re: Synatx: Extern EmptyClipboard | | Date: | Fri, 21 Jan 2005 17:13:58 -0800 |
|
|
 | Heinz Kesting wrote:
> Hallo, > Can anybody help with the correct syntax for the API-function > EmptyClipboard? > I've tried various possibilites, like ... > > extern clogical EmptyClipboard(cVoid) user32 > EmptyClipboard() > > but none succeeded ...
Heinz, did you look at clipbord.cc? It uses that function, but it appears you have to first open the clipboard...some code from the ..cc below.
David
// Open the Windows clipboard if not OpenClipboard( _app.Framewin.hWND ) exit endif
EmptyClipboard()
// Place the text buffer handle in clipboard lSuccess = ( SetClipboardData( CF_TEXT, hDestination ) <> 0 )
CloseClipboard()
|
|
 | | From: | Heinz Kesting | | Subject: | Re: Synatx: Extern EmptyClipboard | | Date: | Sat, 22 Jan 2005 10:49:08 +0100 |
|
|
 | Hi David
> Heinz, did you look at clipbord.cc? Not until now, I started from reading the API help on EmpyClipboard() > It uses that function, but it > appears you have to first open the clipboard...some code from the > .cc below. Aha, I see - in my opinion this would happen automatically when opening the form, since you can work with the clipboard without open it explicitely ... I thought my mistake where somewhere in the extern command, using the wrong parameters etc.
> // Open the Windows clipboard > if not OpenClipboard( _app.Framewin.hWND ) > exit > endif > EmptyClipboard() > // Place the text buffer handle in clipboard > lSuccess = ( SetClipboardData( CF_TEXT, hDestination ) <> 0 ) > CloseClipboard()
And so I got it working. By the way, I guess I found an error in my version of the Clipbord.cc in the line if type( "EmptyClibBoard" ) <> "FP" // should probably be ( "EmptyCli*p*Board" ) extern CLOGICAL EmptyClipboard ( CVOID ) user32 endif
Later on, when the function is called as EmptyClipboard(), it would produce an error ...
Thank you for helping! Best regards, Heinz
|
|
 | | From: | David Stone | | Subject: | Re: Synatx: Extern EmptyClipboard | | Date: | Sat, 22 Jan 2005 09:56:54 -0800 |
|
|
 | Heinz Kesting wrote:
> Thank you for helping!
You're welcome Heinz, and I'm glad you got it working.
David
|
|
|