Recent

Author Topic: SetWindowRgn  (Read 6991 times)

MaxM74

  • New member
  • *
  • Posts: 6
SetWindowRgn
« on: March 07, 2010, 07:21:19 pm »
i have posted a patch in BugTracker some time ago to fix this but..no answer. Someone have and idea why this working code is not added to GTK Widgset

function TGtkWidgetSet.SetWindowRgn(hWnd: HWND;
 hRgn: HRGN; bRedraw: Boolean):longint;
var
   Widget :PGtkWidget;
   WidgetInfo: PWinWidgetInfo;

begin
(*    Widget := GetFixedWidget(PGtkWidget(hWnd));
    if Widget = nil
    then Widget := PGtkWidget(hWnd); *)

     WidgetInfo := GetWidgetInfo(PGtkWidget(hWnd), False);

     if (WidgetInfo^.ClientWidget<>nil)
     then  Widget := PGtkWidget(hWnd)
     else  Widget := gtk_object_get_data(Pointer(PGtkWidget(hWnd)), 'Fixed');

     // gtk_window_set_decorated(PGtkWindow(hWnd), false);

     gdk_window_shape_combine_region (Widget^.window, PGDIObject(hRgn)^.GDIRegionObject, 0, 0);
     Result := 1;
end;