Solved for you but what about the next person that needs to know?
Some excerpts from the AWeb code showing how to get the right image and create a title bar gadget from the buttongclass.
'win' is just a AWeb struct holding various window related data.
if(!(win->iconify_img=(struct Image *)NewObject(NULL,"sysiclass",
      SYSIA_DrawInfo,drinfo,
      SYSIA_Which,ICONIFYIMAGE,
      TAG_END))) return FALSE;      
....
....
....
  if ( NULL != win->iconify_img )
  {
       win->iconify_gad = NewObject(NULL,"buttongclass",
         GA_RelRight,TRUE,
         GA_Titlebar, TRUE,                               
         GA_Image, win->iconify_img,
         GA_RelVerify, TRUE,
         GA_ID, GID_ICONIFY,
         ICA_TARGET, ICTARGET_IDCMP,
       TAG_END );
       if ( NULL != win->iconify_gad )
         AddGadget (win->window, win->iconify_gad, 0);
 }
In you window event loop do like so...
case IDCMP_GADGETUP:
               if ( GID_ICONIFY == ((struct Gadget *)msg->IAddress)->GadgetID )
               Iconify (TRUE);
               break;