Some time clipboard send empty text to fasm editor window.
And selected text disapiared in fasm editor window.
I found in fasm editor this code
wm_copy:
cmp [was_selection],0
je ignore
call copy_to_clipboard
jmp ignore
copy_to_clipboard:
call get_block_length
inc ecx
invoke GlobalAlloc,GMEM_MOVEABLE+GMEM_DDESHARE,ecx
mov ebx,eax
invoke GlobalLock,ebx
mov edi,eax
push ebx
call copy_block
pop ebx
invoke GlobalUnlock,ebx
invoke OpenClipboard,[hwnd]
invoke EmptyClipboard
invoke SetClipboardData,CF_TEXT,ebx
or eax,eax
jz copy_failed
invoke CloseClipboard
retn
copy_failed:
invoke GlobalFree,ebx ;why free only when copy_failed ?
retn
And why fasm editor using GMEM_MOVEABLE+GMEM_DDESHARE ?
And not using only GMEM_MOVEABLE ?
msdn and many tutorials using GMEM_MOVEABLE