Re: Win32Lib and the Clipboard...

new topic     » goto parent     » topic index » view thread      » older message » newer message

On Fri, 7 Apr 2000 06:10:45 EDT, Ben Logan <wbljr79 at HOTMAIL.COM> wrote:

>Greetings,
>
>I'm writing a program in Win32Lib and need to be able to copy a string to
>the clipboard without first putting it in a control and selecting it.  Is
>that possible?  In other words, the user will never see the string, they
>just press a button and it gets sent to the clipboard.

I think you'd have to use 'SetClipboardData'.  More info on this function
is at http://msdn.microsoft.com/library/psdk/winbase/clipbrd_4pup.htm

If you are not sure what to do with this then reply to me personally and I
will give you a hand with a wrapper for it (or if somebody already has a
wrapper for it then they should speak up).

>Also, can I select the text in an SLE or MLE with a command so that I can
>implement a select-all?

This can be easily done using Win32Lib's 'sendMessage' function.  Send the
message 'EM_SETSEL' to your control.  wParam is the starting position and
lParam is ending position.  If the start is 0 and the end is =961, all the
text in the edit control is selected.  More info on EM_SETSEL can be found
at http://msdn.microsoft.com/library/psdk/winui/editcon_4gmk.htm

-- Brian

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu