What is the API equivalent of SetWindowCallback?
I would like to do some more advanced callback stuff, can't seem to find it's equivalent in the Win32 API docs.
API equivalent of SetWindowCallback?
-
dracflamloc
- Addict

- Posts: 1648
- Joined: Mon Sep 20, 2004 3:52 pm
- Contact:
-
Doobrey
- Enthusiast

- Posts: 218
- Joined: Sat Apr 26, 2003 4:47 am
- Location: Dullsville..population: me
- Contact:
Re: API equivalent of SetWindowCallback?
OldProc.l=SetWindowLong_(hwnd,#GWL_WNDPROC,@MyCallbackProc())
Re: API equivalent of SetWindowCallback?
Code: Select all
SetWindowLong_(hWnd, #GWL_WNDPROC, @YourProcHere())
Good programmers don't comment their code. It was hard to write, should be hard to read.
-
Doobrey
- Enthusiast

- Posts: 218
- Joined: Sat Apr 26, 2003 4:47 am
- Location: Dullsville..population: me
- Contact:
Re: API equivalent of SetWindowCallback?
@traumatic
Just type faster!
... anyway, we both forgot to say that you should add
for anything your callback doesn`t handle.
Just type faster!
... anyway, we both forgot to say that you should add
Code: Select all
ProcedureReturn CallWindowProc_(OldProc,hwnd,message,wParam,lParam)
Re: API equivalent of SetWindowCallback?
I guess I should simply start being more self-confident and stop using 'preview' that oftenDoobrey wrote:Just type faster!
What aboutCode: Select all
ProcedureReturn CallWindowProc_(OldProc,hwnd,message,wParam,lParam)
Code: Select all
ProcedureReturn DefWindowProc_(hWnd, msg, wParam, lParam)
Good programmers don't comment their code. It was hard to write, should be hard to read.
-
Edwin Knoppert
- Addict

- Posts: 1073
- Joined: Fri Apr 25, 2003 11:13 pm
- Location: Netherlands
- Contact:
SetWindowCallback() is not equal to the hook described here (afaik).
I believe SetWindowCallback() is resetting the windowclass procedure.
So all windows with the same class will 'suffer'.
The hook described above failed when i tried this in earlier PB versions.
Hopefully something has changed and will let us use hooks.
I believe SetWindowCallback() is resetting the windowclass procedure.
So all windows with the same class will 'suffer'.
The hook described above failed when i tried this in earlier PB versions.
Hopefully something has changed and will let us use hooks.
-
dracflamloc
- Addict

- Posts: 1648
- Joined: Mon Sep 20, 2004 3:52 pm
- Contact:
