Topic: HWND in Byte PTR?

Hi,

I'm new to Blitzmax, and I try to bind Maxgui with 3Impact.

The idea is to open a 3Impact window in a Maxgui window in order to control 3impact from MAxgui gadgets.

Local w:TGadget = CreateWindow("Easy GL Cube in a GUI window", 10, 10, 1024+10, 768+10 )
Local c:TGadget = CreateCanvas(0,0,w.ClientWidth(),w.ClientHeight(),w,0)
Local hwnd:Int = QueryGadget(c,QUERY_HWND)
If Not i3ImpactOpen(hwnd,hwnd) RuntimeError "Unable to initialize the 3Impact game engine"


THE PROBLEM!

You always use BYTE PTR for passing the HWND to i3ImpactOpen, that generate an error "Unable to convert from Int to Byte Ptr" at compile.

Why using Byte PTR when windows handles are int?

I'm stuck

Re: HWND in Byte PTR?

Local w:TGadget = CreateWindow("Easy GL Cube in a GUI window", 10, 10, 1024+10, 768+10 )
Local c:TGadget = CreateCanvas(0,0,w.ClientWidth(),w.ClientHeight(),w,0)
Local hwnd:Int = QueryGadget(c,QUERY_HWND)
If Not i3ImpactOpen(Byte Ptr(hwnd),Byte Ptr(hwnd)) RuntimeError "Unable to initialize the 3Impact game engine"