pasting in blitz

Blitz3D Forums/Blitz3D Programming/pasting in blitz

D4NM4N(Posted 2005) [#1]
hqas anyone found a way of copying text from another prog, and pasting it in blitz?


ozak(Posted 2005) [#2]
Is it just text you want pasted?


ozak(Posted 2005) [#3]
You should be able to make some user32.dll decls and go from there. Or maybe stuff it in a user lib. Quite simple in win32 according to this page: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/dataexchange/clipboard/clipboardformats.asp


ozak(Posted 2005) [#4]
The relevant code is here:
if (!IsClipboardFormatAvailable(CF_TEXT)) 
            return; 
        if (!OpenClipboard(hwndMain)) 
            return; 
 
        HGLOBAL  hglb = GetClipboardData(CF_TEXT); 
        if (hglb != NULL) 
        { 
            lptstr = GlobalLock(hglb); 
            if (lptstr != NULL) 
            { 
                // lptstr now contains your string
            } 
        } 
        CloseClipboard(); 



D4NM4N(Posted 2005) [#5]
ill take a look, thx


John Blackledge(Posted 2005) [#6]
Try the BlitzSys dll in the tools section - does it beautifully.


VIP3R(Posted 2005) [#7]
This might be what you're after...

http://www.blitzmax.com/codearcs/codearcs.php?code=699