Windows Callback

Blitz3D Forums/Blitz3D Userlibs/Windows Callback

TartanTangerine (was Indiepath)(Posted 2005) [#1]
Does anyone know if it's possible to set the Callback function of the B3D window.

I think the command in c++ is :-

LONG SetWindowLong(
HWND hWnd,
int nIndex,
LONG dwNewLong
);

nIndex = GWL_WNDPROC - Sets a new address for the window procedure.
dwNewLong = Address of new function.

Basically I want to direct the callback to a new WindowProc and analyze/react-to different windows events.

Hope someone can help.


TartanTangerine (was Indiepath)(Posted 2005) [#2]
Hmmn. I've been reading some posts and I don't think that this is possible. If someone knows different then please drop me a line.


Luke.H(Posted 2005) [#3]
http://www.melog.ch/dl/WinBlitz3Dbeta016b.zip

If you look at the code you will see it uses WindowLong and has no extra dlls.


Seldon(Posted 2005) [#4]
Look at DATA section. It stores assembly OP-CODES as DATA values. That code is the window-callbak. That is a trick, but it works. I used it to run fast assembly code in Blitz. Actually it was me who suggested that trick to Kevin :-) , some time ago and it seems he used it very well ! A very nice work !