>>Does anyone know what I did wrong????
Nothing when icompile this it works fine. Although i dont really understand why u first draw everything gray (with black window) to set it all blue afterwards.....
Mayb u should try to compile your code and hmm ill just give an example.
Try to do the same thing just put some /* and */ in ur code to see where it goes wrong with you. Because if i hadnt done it this way i would never have seen that there was a black window and grey background be4 the blue window.
textattr(15 + (8<<4));
textattr(15 + (0<<4));
textattr(15 + (1<<4));
And according to my compiler reference: clrscr, window and textattr arent really portable.