Code: Select all
LAYOUT_AddChild, objects[OID_SCREENMODE] = IIntuition->NewObject(NULL, "getscreenmode.gadget",
GA_ID, OID_SCREENMODE,
GA_RelVerify, TRUE,
GA_Disabled,FALSE,
GETSCREENMODE_DisplayID,0,
GETSCREENMODE_MinDepth, 0,
GETSCREENMODE_MaxDepth, 32,
TAG_END),
The example program always works when I cnanged the above code to this:
Code: Select all
#define GetScreenModeClass IGetScreenMode->GETSCREENMODE_GetClass()
LAYOUT_AddChild, objects[OID_SCREENMODE] = IIntuition->NewObject(GetScreenModeClass, NULL,
GA_ID, OID_SCREENMODE,
GA_RelVerify, TRUE,
GA_Disabled,FALSE,
GETSCREENMODE_DisplayID,0,
GETSCREENMODE_MinDepth, 0,
GETSCREENMODE_MaxDepth, 32,
TAG_END),
GETSCREENMODE_GetClass
This function is deprecated as of V52.
Use the "getscreenmode.gadget" public class ID instead.
Can anyone explain why "getscreenmode.gadget" doesn't work reliably but the deprecated function does??