Just popping in ![Just popping in](https://www.amigans.net/uploads/rank3e632f95e81ca.gif)
Joined: 2007/3/23 8:11 Last Login
: 3/4 7:06
From Rehmerloh, Germany
Group:
Registered Users
|
If you need to obtain the sizes before opening the window use this approach:
On AmigaOS4:
struct DrawInfo *dri = GetScreenDrawInfo(screen); GetGUIAttrs(NULL, dri, GUIA_SizeGadgetWidth, &width, GUIA_SizeGadgetHeight, &height, TAG_DONE); FreeScreenDrawInfo(screen, dri);
On AmigaOS3:
struct DrawInfo *dri = GetScreenDrawInfo(screen); struct Image *img; width = 18; /* default sizing gadget width */ height = 10; /* default sizing gadget height */ if((img = (struct Image *)NewObject(NULL, "sysiclass", SYSIA_Size, MEDRES, SYSIA_DrawInfo, dri, SYSIA_Which, SIZEIMAGE, TAG_DONE))) { width = img->Width; height = img->Height; DisposeObject((Object *)img); } FreeScreenDrawInfo(screen, dri);
|