有什么API可以查出,其它窗口上的EDIT控件有没有焦点?

解决方案 »

  1.   

    function HasFocus(Handle:HWND):Boolean;
    begin
     Result:=GetFocus()=Handle;
    end;擁着個來判斷。例如if HasFocus(Edit1.Handle) then...
    另外,最好不要髮重復的帖子,浪費妳的可用分,也使得頁麵看起來不爽。
    嘿嘿~~當這裏版主以來,還從來沒有過過刪貼子的癮,
      

  2.   

    function HasFocus(Handle:HWND):Boolean;
    HWND FindWindowEx(    HWND hwndParent, // handle to parent window
        HWND hwndChildAfter, // handle to a child window 
        LPCTSTR lpszClass, // pointer to class name
        LPCTSTR lpszWindow // pointer to window name
       );找HWND
      

  3.   

    FindWindowIsWindowVisibleIsWindowEnabledHasFocus