支持
看看TScreen.Fonts时怎样取得

解决方案 »

  1.   

    关键字   Stdcall,查查帮助
      

  2.   

    《Delphi开发指南》里面有一段讲callback 的资料,并且还有个EnumWindowsProc的说明!
      

  3.   

    Delphi是支持回调函数的,举个例子(EnumWindows)如下
    {回调函数}
    function EnumerateWindows(hWnd: HWND; lParam: LPARAM): BOOL; stdcall;var
      Form1: TForm1;implementationprocedure TForm1.Button1Click(Sender: TObject);
    begin
       ListBox1.Items.Clear;
       EnumWindows(@EnumerateWindows,0);
    end;function EnumerateWindows(hWnd: HWND; lParam: LPARAM): BOOL;
    var
       TheText: Array[0..255] of char; 
    begin
        if (GetWindowText(hWnd, TheText, 255)=0) then
          Form1.ListBox1.Items.Add(Format('%d = {这个窗体没有标题}',[hWnd]))
       else
          Form1.ListBox1.Items.Add(Format('%d = %s',[hWnd,TheText]));
       Result:=TRUE;
    end;我想看了上面的例子,EnumFontFamilies的用法你应该会用了。