Does subclassing two Graphic controls in the same dialog like this have any potential issues? I use it and haven't seen a problem. Sharing NewGraphicProc.is intended.
I checked and the returned value of OldGraphiProc is the same in both cases. I assume that would always be true for the same control classes.
That would imply that once I get a value for OldGraphicProc I do not need to ask for it again in the second line of code (i.e., I could run that line of code without a return value). But just in case line 1 is not executed at all, line 2 should be written to capture the OldGraphicProc value.
When I un-subclass, I use this:
Code:
OldGraphicProc = SetWindowLong(hGraphicA, %GWL_WndProc, CodePtr(NewGraphicProc)) OldGraphicProc = SetWindowLong(hGraphicB, %GWL_WndProc, CodePtr(NewGraphicProc))
I checked and the returned value of OldGraphiProc is the same in both cases. I assume that would always be true for the same control classes.
That would imply that once I get a value for OldGraphicProc I do not need to ask for it again in the second line of code (i.e., I could run that line of code without a return value). But just in case line 1 is not executed at all, line 2 should be written to capture the OldGraphicProc value.
When I un-subclass, I use this:
Code:
SetWindowLong hGraphicA, %GWL_WNDPROC, OldGraphicProc SetWindowLong hGraphicB, %GWL_WNDPROC, OldGraphicProc
Comment