API - Create window help

Miscellaneous Forums/Win32 Discussion/API - Create window help

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Ok folks. Thanks so far.

I think I've got the structure of MSG wrong though.
During the running of the program I get:

bad refs:obj=$e107a0 refs=$0

Here is how I have defined the structure using this C++ sample ..
typedef struct tagPOINT { // pt  
    LONG x; 
    LONG y; 
} POINT; 

typedef struct tagMSG {     // msg  
    HWND   hwnd;	 
    UINT   message; 
    WPARAM wParam; 
    LPARAM lParam; 
    DWORD  time; 
    POINT  pt; 
} MSG; 


Blitzmax
Type POINTAPI
	Field x%,y%
End Type

Type MESSAGE
    Field hWnd%
    Field Message%
    Field wParam:Byte Ptr
    Field lParam:Byte Ptr
    Field Time%
    Field pt:POINTAPI=New POINTAPI
End Type 

The problem seems to arise after GetMessage()
I've got a feeling its something to do with

Field pt:POINTAPI=New POINTAPI

Maybe that should be a byte ptr?

Latest version -> API Window (BlitzMax)