|
Please don't ask questions unrelated to Managed C++/CLI on this
message board. Use the Visual C++/MFC board instead.
It's only called once for me (VS 2005 SP1).
What if you do this (instead of the extra assignment):
combined d(a);
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
For furture references (solution: )
alpha a; /* Called constructor for alpha */
combined d = combined(a);
First a temporary object combined(a) is created.
For it, first the copy constructor for alpha is called (member objects constructors called first)
=> "Called copy constructor for alpha"
Next, the constructor for temporary combined object is called:
"Three argument Constructor called for combined"
Next, d = temp_object.
Compiler does not find copy constructor for combined class, so its own supplied copy constructor is invoked.
this default copy constructor, copies member by member.
this results in call to copy constructor of alpha
"Called copy constructor for alpha"
|
|
|
|
|
Is there a way for me to set the font color of a Win32 edit box? I know I can set the font type by sending a WM_SETFONT message, but I can't find anything about setting the font color. Any help is appreciated.
|
|
|
|
|
Please don't ask questions unrelated to Managed C++/CLI on this
message board. Use the Visual C++/MFC board instead.
To set the color(s) of edit controls, you can respond to the
WM_CTLCOLOREDIT message in the parent's windowproc and
set the text and background colors.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I'm trying to make simple class derived from ComboBox that processes some command keys. Here is the code:
<br />
#pragma once<br />
<br />
using namespace System;<br />
using namespace System::Windows::Forms;<br />
<br />
namespace ProjectX {<br />
<br />
public ref class EnterComboBox : public ComboBox {<br />
<br />
public:<br />
<br />
EnterComboBox(void) {<br />
}<br />
<br />
protected:<br />
<br />
virtual void ComboBox::ProcessCmdKey(Message^% msg, Keys^ k) override {<br />
<br />
MessageBox::Show("cmdkey");<br />
<br />
ComboBox::ProcessCmdKey(&msg, k);<br />
}<br />
};<br />
}<br />
The compiler outputs error C3254: 'ProjectX::EnterComboBox' : class contains explicit override 'ProcessCmdKey' but does not derive from an interface that contains the function declaration
I'm confused. There is no such interface. I've searched whole e-books, forums for the code sample (and more common overrides, like OnPaint, OnResize etc.) and there is no answer how the hell override some method from the Control's base class
|
|
|
|
|
You have a mismatch, and it should be:
virtual bool ProcessCmdKey( Message% msg, Keys keyData ) override
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Now it works, thanks. But another few hours have been spoiled on this either.
|
|
|
|
|
Hello,
i recive this warnings: warning C4996: 'wcscpy' was declared deprecated
and if i try to use: #pragma warning(disable:4996)
this dont take a efect?
Is there any other way to disable some warnings?
I dont want to change all this wcscpy's to wcpycpy_s!
thanks for help
termal
|
|
|
|
|
This has nothing to do with C++/CLI, try the visual C++ forum.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
In what way 'union' differs from 'struct' type?
|
|
|
|
|
This has nothing to do with C++/CLI, try the visual C++ forum.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
i have posted in VC++ forums.
|
|
|
|
|
What is the difference between 'constant pointer' and 'pointer to a constant'? with example.
|
|
|
|
|
|
Hi, C++/CLI and DDK compatible? can I write driver with C++/CLI? How about C#?
|
|
|
|
|
.NET lanuages, such as C#, VB.NET and C++/CLI, are not appropriate for driver development. You need to use C or C++.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
I want to learn more of C++ but at a lower level(???),
a point where it is not so platform specific.
Where would look or what would I search for to
learn a cross-platform version of C++.
I enjoy C# and VB.NET is so so. And I have written many
apps. in VC++ but I want to learn it where I can knowledgible
write an app for Windows and turn around be able to do on other platforms.
Does anybody understand what I am trying to ask?
God Bless,
Jason
I am not perfect but I try to be better than those before me.
So those who come after me will be better than I am.
|
|
|
|
|
jason_lakewhitney wrote: a point where it is not so platform specific.
You want to learn standard C++. A good starting point is "The C++ Programming Language" by Bjarne Stroustrop. Beyond that, a good point is to ask in the right forum, this one is for .NET C++, you want the Visual C++ forum.
Note, standard C++ has no GUI libraries at all, the moment you want a UI, you want platform specific ( probably MFC ). But, it's good even in an MFC app to use standard stuff like list, vector, ifstream, string, etc.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I knew you would help, thanks.
Christian Graus wrote: a good point is to ask in the right forum
just didn't know where to start.
God Bless,
Jason
I am not perfect but I try to be better than those before me.
So those who come after me will be better than I am.
|
|
|
|
|
A lot of people seem to miss the sticky at the top of the forum that explains it, and just not know what the CLI means. I'm only telling you because more people will see your posts in the right forums. This forum is a ghost town, I just come here to redirect people to the right forum, and not many people ask or answer C++/CLI questions.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
i need to close a running exe file from within a c++ program is there any command in c++, i am using borland turbo c++.
|
|
|
|
|
Why the sudden flood of people not using a Microsoft compiler, but asking for help in the forum for Microsoft .NET extensions for C++ ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: Why the sudden flood of people not using a Microsoft compiler, but asking for help in the forum for Microsoft .NET extensions for C++ ?
I noticed that too! I bet the majority of the postings in this forum are non-C++/CLI. I guess they see the C++ of C++/CLI and think it pertains to non-Visual C++ issues. Anyway, they help our posting numbers!
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
The forum naming kind of sucks. 'Visual C++' implies the MS compiler, and implies a GUI. Lots of people don't know what CLI is, so they ignore it because they figure this is the place to ask non MFC or non MS compiler questions.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I have also noticed bookstores don't know how to categorize C, C#, C++ and C++/CLI books. Some bookseller web sites just group some or all together in one category. I guess when people look at these language names, the symbols mysteriously disappearsand they all look the same. I believe this forum is the twilight zone of forums.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|