. . . Application Event Loop . case WM_REDRAW: RedrawWindow( msg[3], (GRECT *)&msg[4] ); break; . . VOID RedrawWindow( WORD winhandle, GRECT *dirty ) { GRECT rect; wind_update( BEG_UPDATE ); wind_get( winhandle, WF_FIRSTXYWH, &rect.g_x, &rect.g_y, &rect.g_w, &rect.g_h); while( rect.g_w && rect.g_h ) { if( rc_intersect( dirty, &rect ) ) { /* * Do your drawing here...constrained to the rectangle in g. */ } wind_get( winhandle, WF_NEXTXYWH, &rect.g_x, &rect.g_y, &rect.g_w, &rect.g_h); } wind_update( END_UPDATE ); }