Window Buffers...
BlitzPlus Forums/BlitzPlus Programming/Window Buffers...
| ||
Is there a way to get the buffer of a window to draw to, like DesktopBuffer()? |
| ||
what are you going to use it for? besides, cant you just add a canvas gadget to the window? does this statment make me seem really ignorant?.... |
| ||
No it doesn't make you look that ignorant, anyways, this is a window made by a different program. |
| ||
Hmm... If so wouldn't the buffer be contained in the program's memory? If so, then it should be protected on most modern computers and therefore, unaccessible. |
| ||
You could use WinAPI's GetDC(hWnd) command, that returns the windows device context. You'll not be able to use images loaded by using Blitz's internal commands, but you can use GDI commands to load/draw stuff! Dabz |
| ||
Ok, so how do you plan on getting the hwnd of the other programs window? Also, is there any way to do something like that but with full screen programs? |
| ||
By using the FindWindow winAPI function. You can search for a specified window by looking for it's class name, or the text in the windows title bar title bar! FindWindow returns the hWnd of the window you are looking for. That's why I think you should be able to specify your own class name in Blitz+. Full screen apps are just normal windows with a hWnd, so you can still search using FindWindow. Dabz |