initwindow


Syntax
#include "winbgim.h"
void initwindow(int width, int height);
Description[WIN]
The initwindow function is available in the winbgim implementation of BGI graphics. You do not need to include conio.h; just include winbgim.h. The function initializes the graphics system by opening a graphics window of the specified size.

Return Value
None.

See also
closegraph
initgraph

Example
/* initwindow example */ 

#include "winbgim.h"

int main(void)
{
   /* initialize graphics window at 400 x 300 */
   initwindow(400, 300);

   /* draw a line */
   line(0, 0, getmaxx(), getmaxy());

   /* clean up */
   getch();
   closegraph();
   return 0;
}

Back to index