var
  hand:HWND;
  strclnm:array[0..255] of Char;
  str1:string;
  ctrls:TControl;
begin
  StPersonCard;
  hand :=GetFocus;
  if hand=0 then Exit;
  GetClassName(hand,strclnm,256);
  str1:=UpperCase(strclnm);
  if ( pos((str1) ,'TFLATEDIT,TEDIT,TDBEDIT,TDBEDITFLAT')<1) then Exit;
  if TCustomEdit(hand).Hint ='cnum' then
  begin
    //StPersonCard;
    getpersonmsg(TCustomEdit(hand),6);  
  end;
end;TCustomEdit  应该是所有编辑框的始祖吧 怎么还是不行?