Click here to Skip to main content
15,906,708 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I work in vc++2010
I need to run my old programs in graphic (coded using c language) in this environment vc++2010 ,
Can help me how do that???
Thank you
Posted
Updated 3-Dec-11 6:08am
v4
Comments
Sergey Chepurin 13-Aug-11 8:27am    
Old programs from VC 6.0 (or later),in C/C++, MFC, can be upgraded to VC++ 2010 (if in Express edition then VC++ 6.0 first via VC++ 2005/2008). C and C++ are not .NET languages, thus there are no problems related to .NET classes for graphics.

C++
char c = 'a';
int i = (int)c;
 
Share this answer
 
Comments
anassamar 6-Dec-11 9:10am    
tHANKS, BUT I WANT BINARY CODE (NOT DEC CODE)FOR AN EXAMPLE IN C PROGRAME IF I USE %O I GET oct code , and %X i get hex code, but binary CODE I dont know????
Richard MacCutchan 6-Dec-11 9:18am    
You need to write it yourself, something like:

for (int i = 0x80; i !=0; i >>= 1)
{
if (i & c)
printf("1");
else
printf("0");
}
Hi I try to run my graphic program in the tourbo c++ environment (the system in my computer is windows 7):

C++
#include<graphics.h>
#include<stdio.h>
#include<math.h>
#include<conio.h>
#define pi 3.1415

int main (void)
{
int gdriver=DETECT,gmode,errorcode;
int x,y, pcolor;
double angle,sinofA;
initgraph(&gdriver,&gmode,"..//bgi");
setcolor(6);
line(0,100,200,100);
for(x=0;x<200;x++)
{
angle=((double)x/200)*(2*pi);
sinofA=sin(angle);
y=100+100*sinofA;
putpixel(x,y,9);
}
getch();
closegraph();
return 0;
}


The following Error showed:
this system does not support full screen mode.?
 
Share this answer
 
v2
Go for DirectX using VC++ 2010. Thats the best solution for any type of graphics in Visual Studio
 
Share this answer
 
Comments
Richard MacCutchan 15-Aug-11 3:31am    
This is not necessarily true. Many graphics programs will work perfectly well with GDI+ or even GDI, it depends entirely on the problem to be solved.
I need simple way to run my old programs in graphic (i.e add sutable library ...??) because i work now in vc++2010
thank you
 
Share this answer
 
Comments
Richard MacCutchan 14-Aug-11 13:49pm    
Go and look at the links I posted in my answer.
If you are using old style graphics where you write direct to video then you should upgrade by looking at the Windows GDI and GDI+ libraries.
 
Share this answer
 
Comments
Albert Holguin 14-Aug-11 18:37pm    
GDI is pretty straight forward once you get some experience, +5

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900