Getting a hWnd from a Texture or a Bank Buffer

Blitz3D Forums/Blitz3D Programming/Getting a hWnd from a Texture or a Bank Buffer

ZJP(Posted 2009) [#1]
Hi,

Any solution?

JP


Tom(Posted 2009) [#2]
A 'hWnd' is a Window handle, right? Textures & images are not windows.

What is it you wish to do?


ZJP(Posted 2009) [#3]
Hi,

"..What is it you wish to do? .."
Create a buffer with a Windows handle inside Blitz3D. ;-)

JP


_PJ_(Posted 2009) [#4]
Am I right in thinking that what you are attempting to do is store the display of a particular window as an image (or imagebuffer, effectively same thing) in Blitz?

If so, I would look through the uswr32.dll. I can foresee some issues though because in order to grab from the current display, then the front buffer needs to be used (unless say, I think Vista may work differently?), but if the blitz prog is the current focus, it's own drawing buffers would be used. If it isnt the current focus, it wont continue :S

certainly more complicated than it seems.


jfk EO-11110(Posted 2009) [#5]
Not sure what you want to do, but there is some code in the archives that shows how to use a bank as an image. It is using some hacking to optain the imagebuffer address etc. Then you can Poke some bytes to a bank, and then DrawImage the bank. (I think it's in the userlibs section)

Unfort. this won't make Writepixel etc. any faster, the bottleneck lies within the fact, that the imagebuffer is in the VRAM, so access isn'T as fast as normal RAM access. At least that's what I think how it works.


ZJP(Posted 2009) [#6]
Hi,
I want to use this DLL. I need a "hwnd buffer" for that ;-)
http://www.blitzbasic.com/Community/posts.php?topic=77239#865959

JP


Gabriel(Posted 2009) [#7]
You can't magically create a HWND out of nowhere. Textures and Banks don't have HWND's and if you magicked one up, it would just crash. Windows, unsurprisingly, have window handles, and so do some other gadgets. The DLL you refer to seems (I say seems because I don't speak French) to want the HWND to a windows gadget like a canvas. You seem to want to use the DLL for something other than it's intended purpose.


Guy Fawkes(Posted 2009) [#8]
ZJP, try winblitz3d


Gabriel(Posted 2009) [#9]
Indeed, if you want a gadget of some kind in Blitz3D, then WinBlitz3D would be ideal.