钩子函数改为如下试试:
function  mouseproc(icode:integer;wParam:wParam;lParam:lParam):lresult;stdcall;  
     begin  
         if  icode<0  then    begin  
         Result:=CallNextHookEx(idHook,iCode,wParam,lParam);  
                                                                            end
        else if iCode >= 0 then begin 
         if  wparam=wm_mousemove  then        //如果鼠标在屏幕x值633位置右边的话,则在ycfform的caption中显示出x值  
         begin  
         //    t:=findwindow('TForm1','Ycfform');  
             GetCursorPos(mp);  
             if  (mp.X<>633)  then  
                   ycfform.Caption:=inttostr(mp.X);  
         end
       else Result:=CallNextHookEx(idHook,iCode,wParam,lParam);    
 end;
     end;