pasting in blitz
Blitz3D Forums/Blitz3D Programming/pasting in blitz
| ||
hqas anyone found a way of copying text from another prog, and pasting it in blitz? |
| ||
Is it just text you want pasted? |
| ||
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 |
| ||
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(); |
| ||
ill take a look, thx |
| ||
Try the BlitzSys dll in the tools section - does it beautifully. |
| ||
This might be what you're after... http://www.blitzmax.com/codearcs/codearcs.php?code=699 |