Code: Select all
import "comctl32.lib"
SetWindowSubclass(hwnd.i, pfnSubclass.i, uIdSubclass.i, dwRefData.i)
DefSubclassProc(hwnd.i, uMsg.i, wparam.i, lparam.i)
endimport
SetWindowSubclass(0, 0, 0, 0)
Code: Select all
import "comctl32.lib"
SetWindowSubclass(hwnd.i, pfnSubclass.i, uIdSubclass.i, dwRefData.i)
DefSubclassProc(hwnd.i, uMsg.i, wparam.i, lparam.i)
endimport
SetWindowSubclass(0, 0, 0, 0)
the new functions doesn't work on older os, so pb requires not the newest.Justin wrote:That did it. Shouldn't PB use the newest libs?
Code: Select all
Prototype p_SetWindowSubclass(hWnd.i, pfnSubclass.i, uIdSubclass.i, dwRefData.i)
Prototype p_RemoveWindowSubclass(hWnd.i, pfnSubclass.i, uIdSubclass.i)
Prototype p_DefSubclassProc(hWnd.i, uMsg.i, wparam.i, lparam.i)
Prototype p_GetWindowSubclass(hWnd.i, Proc.i, ID.i, RefData.i)
Define.i hComCtl32
hComCtl32 = OpenLibrary(#PB_Any, "comctl32.dll")
If hComCtl32
Global SetWindowSubclass.p_SetWindowSubclass = GetFunction(hComCtl32, "SetWindowSubclass")
Global RemoveWindowSubclass.p_RemoveWindowSubclass = GetFunction(hComCtl32, "RemoveWindowSubclass")
Global DefSubclassProc.p_DefSubclassProc = GetFunction(hComCtl32, "DefSubclassProc")
Global GetWindowSubclass.p_GetWindowSubclass = GetFunction(hComCtl32, "GetWindowSubclass")
CloseLibrary(hComCtl32)
EndIf