home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 2 / DATAFILE_PDCD2.iso / utilities2 / desklib / Libraries / Icon / c / ForceWR < prev    next >
Encoding:
Text File  |  1993-04-10  |  717 b   |  22 lines

  1. #include "Wimp.h"
  2. #include "WimpSWIs.h"
  3.  
  4. extern void Icon_ForceWindowRedraw(window_handle window, icon_handle icon)
  5. /*  Force Redraws the area of WINDOW surrounding the icon, *including*
  6.  *  the 3-d border (validation string "b<bordertype>")
  7.  *  This is a bit obsolete now, but is still included as it may be useful
  8.  *  code to look at if you want to do similar stuff...
  9.  */
  10. {
  11.   window_redrawblock r;
  12.   icon_block         istate;
  13.  
  14.   Wimp_GetIconState(window, icon, &istate);
  15.   r.window    = window;
  16.   r.rect.min.x = istate.workarearect.min.x - 4;
  17.   r.rect.max.x = istate.workarearect.max.x + 4;
  18.   r.rect.min.y = istate.workarearect.min.y - 4;
  19.   r.rect.max.y = istate.workarearect.max.y + 4;
  20.   Wimp_ForceRedraw(&r);
  21. }
  22.