I've a dialog box with an edit control in it that is write protected. how to copy the text in it to clipboard? i already tried:



invoke SendMessage,hEdit,WM_COPY,0,0


but it doesn' t work.

NOP-erator
Posted on 2001-08-05 10:58:41 by NOP-erator
try this:



call GetWindowTextA, EDITBOX_HANDLE, offset EditText, 100h
call OpenClipboard,0
call EmptyClipboard
call GlobalAlloc,0000h,63
mov hMemNum,eax
call RtlZeroMemory,hMemNum,64


call RtlMoveMemory,hMemNum,offset EditText, NumberOfCharachter
call SetClipboardData,0001h,hMemNum
call CloseClipboard

now your text is on the clipboard
Posted on 2001-08-05 16:57:49 by Bit7
I wrote a clip board file for a dialog box i was writing.. It basically takes all the data feilds and text formats them on the clipboard. I use alot of macro for this but they are well defined in the top of the file.. As well It shows basically the same outline as above (in a bit more detial)..

Check it out if it helps..
Posted on 2001-08-05 19:51:19 by NaN
Your problem is probably that you forgot to set a selection
in your edit control like this:

invoke SendMessage, hEdit, EM_SETSEL, 0, -1
invoke SendMessage, hEdit, VM_COPY, 0, 0

This should solve your problem. That your edit
control is locked does not matter.
Posted on 2001-08-06 01:41:11 by KetilO