Back

GetGadget()




    USAGE

    Gadget = (struct Gadget *) GetGadget(Window, GadgetID)

    FUNCTION

    Returns a pointer to the gadget requested with the GadgetID. If there is a non-system gadget in the window's gadget list with this ID, it will be returned. If not, NULL is returned.

    This is useful for getting access to gadgets without having to have their names hard coded into the program.

    INPUTS

    Window = Pointer to the window the gadget resides in.
    GadgetID = Short integer ID of the requested gadget.

    RESULT

    Gadget = Pointer to the requested Gadget, NULL if it doesn't exist.