Window Buffers...

BlitzPlus Forums/BlitzPlus Programming/Window Buffers...

plash(Posted 2006) [#1]
Is there a way to get the buffer of a window to draw to, like DesktopBuffer()?


Senzak(Posted 2006) [#2]
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?....


plash(Posted 2006) [#3]
No it doesn't make you look that ignorant, anyways, this is a window made by a different program.


Alaric(Posted 2006) [#4]
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.


Pineapple(Posted 2006) [#5]
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


Alaric(Posted 2006) [#6]
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?


Pineapple(Posted 2006) [#7]
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