试一试
lpPrevWndProc:= SetWindowLong(gHW,GWL_WNDPROC,integer(@WindowProc));