Given a MS Windows Control whose handle is hCtl, acquire its window proc:
    
    
    var wprc:WNDPROC = GetWindowLongPtr(hCtl,GWL_WNDPROC)   #statement 1
    

Inside an alternate window proc for a subclass of hCtl, final default execution 
is:
    
    
    CallWindowProc(wprc,handle,message,wparam,lparam)    #statement 2
    

Compiler either rejects statement 1 as written or when statement 1 is rewritten 
as:
    
    
    var wprc:LONG_PTR = GetWindowLongPtr(hCtl,GWL_WNDPROC)
    

then rejects statement 2.

How do I convert the LONG_PTR result from the GetWindowLongPtr into the WNDPROC 
parameter of GetWindowLongPtr? I tried wprc.WNDPROC or equivalently 
WNDPROC(wprc) but those are rejected also.

Reply via email to