|
Managed C++ is a .NET C++ language, which now is offically called C++/CLI (common language infrastructure) on .NET Framework 2.0. It contains lots of extensions to ISO C++ (unmanaged). Microsoft has submitted C++/CLI spec to ECMA.
Best,
Jun
|
|
|
|
|
Give me this error:
Error 1 Command line error D8045 : cannot compile C file '..\..\..\..\Dev\API_C++\cutil.c' with the /clr option cl
But it's a very ordinary C file!
no special function like setjmp just malloc/free and some pointers
Any idea?
|
|
|
|
|
Never mind, solved...
|
|
|
|
|
From MSDN ( http://msdn2.microsoft.com/en-us/library/ms173265(d=ide).aspx )
Known Issues Compiling Library Projects with /clr
Visual C++ 2005 contains some known issues when compiling library projects with /clr:
When compiling an MFC ActiveX control project with /clr in the development environment, the build system will attempt to register the .dll with regasm and not regsvr32. You must manually register the control with regsvr32.
When you create an ATL project and then enable /clr, the .c files will generate an error, because .c files cannot be compiled with /clr. However, if you change the file settings to compile the file with /TP, you will generate linker errors. The resolution is to compile the .c files as native (without /clr).
|
|
|
|
|
Sir, What are the function that will be added automatically when a Object in C++ is created .
Fly Like An Eagle With MIGHTY POWER.
|
|
|
|
|
Default Constructors, Default Destructor. If you add a constructor with empty parameter list yourself, no other constructors are added.
(Note: Added, to me, means "functions which are neither inherited nor explicitly implemented".)
Cheers,
Sebastian
--
Contra vim mortem non est medicamen in hortem.
-- modified at 5:45 Tuesday 11th July, 2006
|
|
|
|
|
as we are on a managed C++, i think he was talking about the member function inherited from a CObject-like class (but i don't know .NET programming that much)
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
Might be.
In that case, there is no single answer. Every accessible member of the base class is "added", so the functions added really depend on the base class. The only thing you can say is that "everything is an Object", so the accessible Object-functions are available for "everything".
Cheers,
Sebastian
--
Contra vim mortem non est medicamen in hortem.
|
|
|
|
|
I have real time data to be displayed on a X-Y graph. I need to use Double buffering to avoid flickering.
How to accomplish Double Buffering in Managed C++.
|
|
|
|
|
There are several approaches. If you use GDI+ to draw, one simplest is creating a bitmap graphic object as the buffer. Draw to the buffer. Whenever necessary, draw (copy) the buffer to the screen.
Best,
Jun
|
|
|
|
|
Jun, thank you for the suggestion,, I shall attempt doing this and shall post the result back here
Cheers
Pavan
|
|
|
|
|
I know this sounds like an ad, but have a look at ZedGraph. Its GPL'ed, documented both on CP and SF, and available from SF or CP as well.
You would be able to offer zooming, human-readable axis-dimensions (min, max, stepsize) and other useful stuff.
Cheers,
Sebastian
--
Contra vim mortem non est medicamen in hortem.
|
|
|
|
|
I hope this will help
// in order to solve flickering i have to use double buffering
this->SetStyle( ControlStyles::AllPaintingInWmPaint, true);
this->SetStyle( ControlStyles::UserPaint, true);
this->SetStyle( ControlStyles::DoubleBuffer, true );
|
|
|
|
|
I have an upcoming TAPI project to be written using Visual C++ 2005. Im just wondering is there some new fan-dangled API in the dot net framework that supercedes the TAPI API?
|
|
|
|
|
I want to know if declaring soemthing like this makes sense?
I have a class whose declario is as follows:
namespace Utility {
class Filebase : public fstream {
public:
and I want to declare a vector of objects of this class. Currently w/o vector I am using an object of this class as:
string signal = ".s_"+layer+"_" + toString (iStage);
Utility::Filebase temp (signal, ios::out);
temp.create(signal);
I want to use Filebase temp using a vector
Is this possible in C++?
Thanks
Suddha
|
|
|
|
|
I am looking for a way to add a 16 X 48 matrix of owner drawn buttons to a small
utility I am developing in VC++ 2005. Can anyone direct me to specific articles
or code to accomplish this task. I want to preserve 2d addressing. Initialization
might go like:
private: System::Windows::Forms::Button^ Mybutton[][];
Chris
|
|
|
|
|
Go through this code, it may help
array<Button^,2>^ myButton = gcnew array<Button^>(10)(10);
myButton[0][0]=gcnew Button();
myButton[0][0]->Location = System::Drawing::Point(300, 189);
myButton[0][0]->Name = L"button123";
myButton[0][0]->Size = System::Drawing::Size(148, 41);
myButton[0][0]->TabIndex = 1;
myButton[0][0]->Text = L"Added";
myButton[0][0]->UseVisualStyleBackColor = true;
this->Controls->Add(myButton[0]);
this->myButton[0][0] ->Click += gcnew System::EventHandler(this, Form1::button123_Click);
Nagaraju
-- modified at 0:29 Saturday 8th July, 2006
|
|
|
|
|
Thank you, I will try the code and will get back in day or two.
Chris
|
|
|
|
|
Hi all,
Help me to Get rid of my Task.
In which Some I have to Read contents of some .pdf File and
Write all those Contents in a .txt file and save it;
But When I try to read .pdf file data ,it is showing the encripted charecters.
Pls suggest me
Nagaraju
|
|
|
|
|
I have a function in cpp file returning int * array and taking int * array as a parameter. It is as:
int * funcArg(int *a ) {
int DLLArg [] = {100,200,300};
a=DLLArg;
return a;
};
I have exported this function in the dll (i have checked it with dumpbin.exe)
But I can not handle this function in c# client. My code in c# is as: ( ıt gives this error. "An unhandled exception of type 'System.Runtime.InteropServices.SafeArrayRankMismatchException' occurred in CSharpClient.exe
Additional information: Safe array of rank 51241 has been passed to a method expecting an array of rank 1."
What should I do? URGENT help!!!
namespace CSharpClient
{
class Class1
{
[DllImport("DenemeNonMfcDll.dll",EntryPoint="?Sub@DLLclass@@QAEHHH@Z")]
public extern static int Sub(int a, int b);
[DllImport("DenemeNonMfcDll.dll")]
[return: MarshalAs(UnmanagedType.SafeArray)]
public extern static int [] funcArg(int [] a);
public static int [] intArray = new int [3] {0,1,2} ;
static void Main(string[] args)
{
foreach (int num in funcArg(intArray) )
{
System.Console.WriteLine(num.ToString());
}
Console.WriteLine("Press any key to continue...");
Console.ReadLine();
}
}
}
|
|
|
|
|
Hi,
I want to use a GUI component, which was developed using the MFC, in a .Net program. Is it possible to access the classes using some mc++ wrapper layer? Are there any problems due to the use of the MFC due to which I can not access this component with .Net? If this is possible, how do i do this? Do you know any sample, where somebody did something similar?
Cheers
gunag
|
|
|
|
|
hi all,
I am working in VC++6.0 IDE.
I want to create a pop-window which displays some message.
Can anyone assist me on how to proceed further and where i can get some useful information.
Thanks in advance,
Veenu.
|
|
|
|
|
Use message box.
Best,
Jun
|
|
|
|
|
hi jun,
Thank you for the reply.
I tried out Message Box function and it is working fine for me.
I have a doubt.
I want to send a variable value to the mesaage box to output it in the popup .
I mean if i have smthing like this:
for (i=0;i<2;i++)
{
MessageBox( .... );
}
Is there anyway to include this variable , "i" value into the mesage box ?
Thanks in advance,
Veena.
|
|
|
|
|
Yes. Although Message Box only takes string prarameters, you can always put variables into the string you're going to display. For example,
char str[256];
for (i=0;i<2;i++)
{
sprintf(str, "The variable is: %d", i);
MessageBox(str, ...);
}
Note this is just native C code.
Best,
Jun
|
|
|
|