Hi everyone,
I use Visual Studio 2005 c++ and i want to draw graphics.
I see that there are some library given on the web.
The project that i use is that : MFC Application , Application type : Dialog Based
But i have a problem. With this type of project i have just acces to IDC_STATIC picture control, and i dont have acces to IDC_DRAW_CONTROL .
Do you know what is the solution to have acces to this IDC necessary to use draw functions.
Thanks

Problem to use draw functions with Visual Studio 2005
dnorris
The example just contains a .cpp file and a .h file , and it is not enought to add this files to my project.
To solve my problem i tried to add this line : using
namespace System;But the compiler make a mistake :
c:\power_chain_efficiency\power_chain_efficiencydlg.cpp(10) : error C2871: 'System' : a namespace with this name does not exist
I do not understand why the program dont find this namespace.
Note : when i type : using namespace std; there is no problem.
oris
Is the /clr compilation mode enabled You need that to use .NET namespaces and types.
For your original problem, try changing the ID of a static control in your dialog to IDC_DRAW_CONTROL.
ppngiap
You can type it in (if it's not in the dropdown list), and an appropriate #define will be automatically added to your resource definitions header file.
MKN
Thanks Nishant for the '/clr' option its solve the compilation.
But about to change ID to IDC_DRAW_CONTROL, i cannot do that because i didn t find it on the list given on "property box > ID"
imin
Those are resource IDs given to controls. You need to download the entire code from the article you were referring.