如题

解决方案 »

  1.   

    要实心多边形还是
    SetWindowRgn
      

  2.   

    要实心多边形,还是空心的?
    如果是实心的用SetWindowRgn就可以了。
    如果要空心的麻烦一点,你得用CombinRgn合成一个空心rgn,然后用setwindowrgn
    创建
      

  3.   

    你说的这个,这次borland程序员大赛获奖作品中有一个,It's difficult for me .到www.delphibbs.com上看一下吧,会公开原码的。灌水
      

  4.   

    to apache57(虾米) ( ): 
      能否说得具体点。
      

  5.   

    你需要作一个多边形控件吧。给你个demo,把窗体设置成空心多边形。可点击。
    procedure TForm1.Button1Click(Sender: TObject);
    var
      pts : Array [1..5] of TPoint;
      rgn,rgn1 : HRgn;
    begin
      pts[1] := Point(100,100);
      pts[2] := Point(160,185);
      pts[3] := Point(140,245);
      pts[4] := Point(60,245);
      pts[5] := Point(40,185);
      rgn := CreatePolygonrgn(pts,5,winding);
      pts[1] := Point(100,98);
      pts[2] := Point(158,185);
      pts[3] := Point(138,243);
      pts[4] := Point(62,243);
      pts[5] := Point(42,185);
      rgn1 := CreatePolygonRgn(pts,5,winding);
      combinergn(rgn,rgn,rgn1,rgn_xor);
      SetWindowrgn(handle,rgn,true);
    end;