VC++ Callback

Archives Forums/Blitz3D SDK Programming/VC++ Callback

SteAbra(Posted 2008) [#1]
Hi!

please help me to integrate my own callback with Blitz3DSDK. i am an old blitz3d user but new to vc++ ...

LRESULT CALLBACK Blitz(HWND, UINT, WPARAM, LPARAM);

...

bbSetBlitz3DEventCallback(Blitz); ???

LRESULT CALLBACK Blitz(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_PAINT:
...
break;
case WM_COMMAND:
...
break;
}
return FALSE;
}

any hints or ideas with bbSetBlitz3DEventCallback?

thanks!

Stephan


Kale Kold(Posted 2008) [#2]
You need to use a function pointer to the callback as a parameter in bbSetBlitz3DEventCallback(). Also the function/pointer needs to be using CDECL calling convention.

More Info:

http://www.newty.de/fpt/index.html


SteAbra(Posted 2008) [#3]
Hi Kale!

Thanks for your support ... but a working solution would be wonderful!

Stephan


Kale Kold(Posted 2008) [#4]
he he, i would like to see a working solution too but alas C++ isn't my language, it scares me ;) I prefer C# where everything is a bit more easier to understand. :D