Dislin Visual Studio : Graphics not displayed

51 views
Skip to first unread message

Puneet Ginoria

unread,
May 19, 2012, 1:33:54 PM5/19/12
to dislin-users
Hi , I have made a C program in C and i try to run it through visual
studio 2010 . It runs but shows no output. What is the problem ?

Here is the code:

#include "stdio.h"
#include "stdafx.h"
#include "stdlib.h"
#include "dislin.h"
#include <math.h>
#include <Windows.h>

int main()
{

int w = 800;
int h = 600;
int n = w*h;
unsigned char *d = (unsigned char *)malloc(n*4); // reserve place for

metafl("VIRT");
window(0,0,w,h);
winsiz(w,h);
page (w, h);
disini();
rectan(0,0,w,h);
imgmod("RGB");
imgini();
rpixls(d,0,0,w,h);
imgfin();
disfin();
getchar();
return 0;
}

Helmut Michels

unread,
May 20, 2012, 8:06:11 AM5/20/12
to dislin-users
Hi Puneet,

you are using the output device "VIRT" in metafl. This keyword means
that
the graphics is just created and hold in memory. If you replace "VIRT"
by
the keyword "CONS", your plot will be displayed on the screen.

Best regards,

Helmut

Puneet Ginoria

unread,
May 20, 2012, 8:44:14 AM5/20/12
to dislin...@googlegroups.com
Thanks , That helped a lot.
Reply all
Reply to author
Forward
0 new messages