Handle to Existing Window

BlitzPlus Forums/BlitzPlus Programming/Handle to Existing Window

Is there any way to get a Blitz Window Gadget handle to another window if you have the HWND? Either that, or is there a way to create a canvas on another window if you have the HWND?

Do you mean another window OUTSIDE B+??

cb

That's exactly what I mean.

You know what? Does anyone know the Windows API commands to get the X and Y position of a window and its width and height as well?

Does anyone know the Windows API commands to get the X and Y position of a window and its width and height as well?
No API calls needed. Since everything in BlitPlus is a gadget (including windows) use:

; window x/y/w/h

win=CreateWindow("Move/Resize me",280,30,250,190,Desktop(),11)

Repeat
	wx=GadgetX(win) : wy=GadgetY(win)
	ww=GadgetWidth(win) : wh=GadgetHeight(win)
	SetStatusText win,"x="+wx+"  y="+wy+"    width="+ww+"  height="+wh
Until WaitEvent()=$803

End


No, I mean the x, y, width, and height of a windows window, not necessarily a window created with BlitzPlus, but a window created by any program. I have the windows hwnd.

BOOL GetWindowRect(
HWND hWnd, // handle to window
LPRECT lpRect // address of structure for window coordinates
);


but you need to know the hwnd... and youll need to write a dll to do that :D... i have a dll which can do that but i wont have time to give it to you until, a week friday