How do i copy 1 character into the clipboard?
Posted on 2001-09-22 20:14:13 by ChimpFace9000


invoke GlobalAlloc, GMEM_MOVEABLE OR GMEM_DDESHARE, 2
mov [hMemory], eax
invoke GlobalLock, eax ; lock the buffer
mov [dwBuffer], eax
mov word ptr [eax], "a" ; copy a and zero to the buffer
call CloseClipboard
invoke OpenClipboard, [hWnd]
call EmptyClipboard
invoke SetClipboardData, CF_TEXT, [dwBuffer]
call CloseClipboard


You do not really need to free the hMemory handle, since its for clipboard.
Posted on 2001-09-23 09:23:27 by comrade
While we are on this topic, I read a while ago you can have multiple clip board data... But this code (which is what im use to) implies a sequencial in-and-out loading of data. Ie) Old existing data is destroyed as new data is placed on the clip-board.

So how would you manage multiple clip-boards?

NaN
Posted on 2001-09-24 01:38:57 by NaN