C 5.10 Graphics Hang on Drawing Rectangle Outside Clip Region

ID Number: Q30527

5.10

MS-DOS

buglist5.10 fixlist6.00

Summary:

The program below attempts to draw a rectangle outside of a clipping

region that is defined using the function _setcliprgn() from the

graphics library. When compiled with C version 5.10, the program will

hang when run.

Microsoft has confirmed this to be a problem with the graphics

routines that were supplied with version 5.10 of the C compiler. This

problem was corrected in C version 6.00.

Sample Code

-----------

#include <stdio.h>

#include <graph.h>

void main(void)

{

_setvideomode(_MRES16COLOR);

_setcliprgn(0,0,200, 125);

_rectangle(_GFILLINTERIOR, 220, 150, 240, 200);

while (!kbhit()) ;

_setvideomode(_DEFAULTMODE);

}