When the user or an application performs an Intuition operation which causes damage to a window, Intuition notifies that window's application. It does this by sending a message of the class idcmp_refreshwindow to that window's IDCMP. In response to this message, your application should update the damaged areas. Rendering proceeds faster and looks cleaner if it is restricted to the damaged areas only. The beginrefresh()/endrefresh() pair achieve that. The application should call BeginRefresh() for the window, and then do its rendering. Any rendering that would have gone into undamaged areas of the window is automatically discarded; only the area in need of repair is affected. Finally, the application should call EndRefresh(), which removes the restriction on rendering, and informs the system that the damage region has been dealt with. Even if your application intends to do no rendering, it must at least call BeginRefresh()/EndRefresh(), to inform the system that the damage region is no longer needed. If your application never needs to render in response to a refresh event, it can avoid having to call BeginRefresh()/EndRefresh() by setting the WFLG_NOCAREREFRESH flag or the wa_nocarerefresh tag in the openwindowtaglist() call. Note that by the time that your application receives notification that refresh is needed, Intuition will have already refreshed your window's border and all gadgets in the window, as needed. Thus, it is unnecessary to use any of the gadget-refreshing functions in response to an idcmp_refreshwindow event. Operations performed between the beginrefresh()/endrefresh() pair should be restricted to simple rendering. All of the rendering functions in Intuition library and Graphics library are safe. Avoid refreshglist() or refreshgadgets(), or you risk deadlocking the computer. avoid calls that may lock the layerinfo or get complicated in intuition, since BeginRefresh() leaves the window's layer or layers locked. Avoid autorequest() and easyrequest(), and therefore all direct or indirect disk related DOS calls. See the "intuition gadgets" chapter for more information on gadget restrictions with BeginRefresh()/EndRefresh(). simple refresh smart refresh superbitmap refresh