I have three child windows in the main HWND of a program. I am subclassing one of them so as to be able to do some custom mouse-handling in that child. The callback I assign only seems to stick if I use GetChildFromPoint() when I switch the procedures. Attempting to use the window handle itself doesn't work. (????)
With everything else held constant:
originalProcHandle = SetWindowLong(hChildHandle, GWL_WNDPROC, (DWORD)mycallback);
fails
POINT p; p.x = 203; p.y = 5;
originalProcHandle = SetWindowLong(ChildWindowFromPoint(hMain, p), GWL_WNDPROC, (DWORD)mycallback);
works
This will work for the present case because I know the starting positions of all the windows but if I were to use this in situations where the starting positions might be variable it would not work or would be require extra coding.
Anyone ever experience this?
--Will Duty
wduty@radicalfringe.com
With everything else held constant:
originalProcHandle = SetWindowLong(hChildHandle, GWL_WNDPROC, (DWORD)mycallback);
fails
POINT p; p.x = 203; p.y = 5;
originalProcHandle = SetWindowLong(ChildWindowFromPoint(hMain, p), GWL_WNDPROC, (DWORD)mycallback);
works
This will work for the present case because I know the starting positions of all the windows but if I were to use this in situations where the starting positions might be variable it would not work or would be require extra coding.
Anyone ever experience this?
--Will Duty
wduty@radicalfringe.com