|
I looked in crtdbg.h from VS 2003.
I'm not sure why you are using something internal to the runtime library - these things can change
at any given version...
What are you trying to do?
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
As I am dealing with the convertion of VS2003 to VS2005, I will use it at this stage until I will find better solution....
|
|
|
|
|
Cool whatever works
If it helps any, I believe it's used by the _ASSERT, _ASSERTE Macros[^]
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
hi friends,
here is the problem I want to resolve:
- I have App 1: a C# application which I'm using now;
- I have App 2: a C++ application which exists and can provide me some useful informations I need in my c# application.
I want to know how I should do if I want to build a C++ application which will allow communication between application 1 and application 2. Let's call this bridge application, App 3.
I want to be able to do following things:
1- send data from App 1 (C#) to App 3 (C++);
2- parse data received from App 1 in App 3;
3- send data from App3 (C++) to App 2 (C++);
4- send back data from App2 (C++) to App 3 (C++);
5- send back data from App 3(C++) to App 1(C#);
6- Display my data in my C# application.
Has anyone of you already resolved this kind of "problem".
I would like App 3 (C++) to be Systray application which would use windows messages to make interprocess communications.
Can you please help me ?
I hope I've detailed enough the context.
Thanks !
Patrick.
p.f. Goudjo-Ako
Bringing our energy together !
|
|
|
|
|
WM_COPYDATA is the easiest way to communicate between processes. There's no need for a bridging app, in fact, if there was one, then you'd need to handle messages between three apps, instead of two.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
Hi Christian,
thanks for your reply.
I'm going to use "WM_COPYDATA" since it seems to the best way to do that.
I can't really alter the existing C++ app, but I'll still have a communication by messages sending between two processes because I can create a new c++ app which can use the dependencies from the existing C++ one. I'll have to make communication between my C# application and the C++ one I'll have created.
I'm started looking at that.
Any idea in using the elements you guys think I'll need is welcome !
Thx !
Pat.
p.f. Goudjo-Ako
Bringing our energy together !
|
|
|
|
|
Hello I have my interface and I want to introduce in the textBox "ContainerWidthtextBox" a value and if this value is lower then 0 to show me the messagebox to introduce a value grater than 0 but it give me an error like...Input string was not in a correct format.
private: System::Void ContainerWidthtextBox_TextChanged(System::Object^ sender, System::EventArgs^ e) {
W = Convert::ToInt32(ContainerWidthtextBox->Text,CultureInfo::CurrentCulture);
try{
if(W <= 0)
{
MessageBox::Show("You must specify a Container Width greater than 0" , "Error", MessageBoxButtons::OK, MessageBoxIcon::Error, MessageBoxDefaultButton::Button1);
return;
}
}
catch (System::FormatException())
{
}
|
|
|
|
|
Use int.TryParse instead of Convert::ToInt32. It's probably int::TryParse in C++/CLI
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
it's not working....
|
|
|
|
|
lavy2883 wrote: it's not working
What it? If you are getting exception it means that the string is not number
|
|
|
|
|
If I make the code like this
private: System::Void ContainerWidthtextBox_TextChanged(System::Object^ sender, System::EventArgs^ e) {
W = Convert::ToInt32(ContainerWidthtextBox->Text);//, CultureInfo::CurrentCulture);
if(W <= 0)
{
MessageBox::Show("You must specify a Container Width greater than 0" , "Error", MessageBoxButtons::OK, MessageBoxIcon::Error, MessageBoxDefaultButton::Button1);
return
}
}
it's not working either..it put me the same error...but if I have in may interface another textbox let's say ContainerHeighttextBox and if I put the code like this.....
private: System::Void ContainerWidthtextBox_TextChanged(System::Object^ sender, System::EventArgs^ e) {
//the code was first here
}
}
private: System::Void ContainerHeighttextBox_TextChanged(System::Object^ sender, System::EventArgs^ e) {
//now I put it here
W = Convert::ToInt32(ContainerWidthtextBox->Text);//, CultureInfo::CurrentCulture);
if(W <= 0)
{
MessageBox::Show("You must specify a Container Width greater than 0" , "Error", MessageBoxButtons::OK, MessageBoxIcon::Error, MessageBoxDefaultButton::Button1);
return;
}
it's works but it's show me the messageBox after I introduce the value in the first textbox(it show me the messagebox at the seccond textbox not at the first where I need it )
lavi
|
|
|
|
|
You could also be having problems because you are using the TextChanged event. that means anytime you add/remove a character from the textbox it will fire this event which i don't think is what you want. I would rather use the Leave or Validating event. also i would do a bit more validating like checking for text length and use the Int32::TryParse like christian suggested.
if (ContainerWidthtextBox->TextLength > 0){
int w = 0;
if (Int32::TryParse(ContainerWidthtextBox->Text, w)){
if (w <= 0){
MessageBox::Show("You must specify a Container Width greater than 0" , "Error", MessageBoxButtons::OK, MessageBoxIcon::Error, MessageBoxDefaultButton::Button1);
return;
}
}
else
MessageBox::Show("you did not enter a valid number.");
}
-- modified at 12:28 Monday 28th May, 2007
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
thanks..,that was not realy my problem ...for example if for the "ContainerWidthtextBox" I have the value 230 from the interface and I want to put a condition for the "ContainerHeighttextBox" to not be less than 2*ConatinerWidthtextBox.... I managed to do this(to put the condition)...but it not let me to introduce all the numbers for the ContainerHeighttextBox because it give me ..... after the first number... let's say "2" MessageBox that the number introduced is not....whatever...please help me.
Y can solve this problem only if I put the condition in the textBox that it's after the ContainerHeighttextBox..let's say...depttextBox
lavy
|
|
|
|
|
You said 'it's not working', but you didn't do what I said....
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
thanks...It help me a lot...sorry ...
|
|
|
|
|
hi all
if some one whit knowledege coud sacrify 2-3 minutes it woud save me a day time
a have a class X now i wana make a class Y wich woud derive all methodes, variables of X and has new ones
i wana ensure in X that certain methode are implemented in Y wich arent in X but declared
i wana overwrite methodes of X in Y
how do i write functions for operators that this works :
Myclass a=Myclass();
a++;
a=a*a;
...
..
i was try to use System::String inside a struct and was geting erros that i cant use a managed type in a struct blabla
i have solved this by using a class instead but woud by nice to know if there is a way around
similair problems seams to ocure if i try to use them as static
i woud like to have a static array in my class whit a pointer to all instances of this class this is important else way i have trubel
if some one coud give me a 10-20 line example it woud by great
just code no need for description
|
|
|
|
|
working half way
how can i get this out of class.h in to the class.cpp file :
virtual int Show(void){return 1;};
virtual int Show(void)override{....
something like :
virtual int Memory::Show(void)override{
wich isnt woking
|
|
|
|
|
You need to define operator* and operator+.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
Hi all
i want to know that when i return value from the function the value return to where
thank's for all
To Be Or Not To Be
(KARFER)
|
|
|
|
|
OSAMA SALLAM wrote: when i return value from the function the value return to where
the caller (really!)
-- modified at 13:42 Friday 25th May, 2007
I thought this question was familiar - see here[^]
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
This is the C++/CLI forum, I assume this question is about C++ in general. I recommend buying a very base level beginner book and working through it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
Does this question for this forum or Sql ?
|
|
|
|
|
hi all
stuckt agein
hope i not highjack this hole topic
void Disp::Lock_Down(System::Object ^o, System::Windows::Forms::MouseEventArgs ^e){<br />
Lock->MouseMove += gcnew System::Windows::Forms::MouseEventHandler( this, &Disp::Lock_Drag );<br />
MousePosition=MainF->MousePosition;<br />
}<br />
void Disp::Lock_Up(System::Object ^o, System::Windows::Forms::MouseEventArgs ^e){<br />
>>>>>>>>>>>>>> not like this but how ??? :confused: <br />
Lock->MouseMove->Remove(this, &Disp::Lock_Drag);<br />
<<<<<<<<<<<<<<<br />
}
-- modified at 9:48 Friday 25th May, 2007
this works
void Disp::Lock_Down(System::Object ^o, System::Windows::Forms::MouseEventArgs ^e){<br />
t = gcnew System::Windows::Forms::MouseEventHandler( this, &Disp::Lock_Drag );<br />
Lock->MouseMove += t;<br />
MousePosition=MainF->MousePosition;<br />
}<br />
void Disp::Lock_Up(System::Object ^o, System::Windows::Forms::MouseEventArgs ^e){<br />
Lock->MouseMove -= t;<br />
}
BUT i realy not like "t"
is there a way to get it somehow else mayby out of Object ^o or MouseEventArgs ^e
or how ever whit out the need to store it by my self
|
|
|
|
|
i want a code of piano play with mouse in c++ coding
|
|
|
|
|
Wow
|
|
|
|