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:
but it doesn' t work.
NOP-erator
invoke SendMessage,hEdit,WM_COPY,0,0
but it doesn' t work.
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
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
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..
Check it out if it helps..
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.
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.