C++ GUI Button Problem!!!

i want to check the button whether it is clicked.
The idea i want to is that:

if(button1 clicked)
{
}


Please help!!!

Moreover, how can i change the char* to String^, it is because i want put the message in char* to the message box.

Thanks a lot!
String^?
closed account (z05DSL3A)
kbw, String^ is C++/CLI


ryanma, try:
String^ s1 = gcnew String( charPtr );
OH thank!!!!
how can i deal with the problem:
if(button1 clicked)
{
}??
closed account (z05DSL3A)
I don't know exactly what you are trying to achieve but you could look at
1
2
3
4
if(button1.IsPressed)
{
    //...
}
i am using visual studio 2008, i can't find the .Ispressed.

closed account (z05DSL3A)
What exactly are you trying to do?
when i clicked a button on Form2,
Form1 can do something.
i want to pass a argument to a button.
the situation like this..


public:System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
add(a,b);




}
a and b are the variable i want to pass, how can i deal with it??
Please HELP!
closed account (z05DSL3A)
Firstly, sorry for not getting back to you sooner, had to get back to work.

Secondly, you are not being very clear about what you want to do.
when i clicked a button on Form2,
Form1 can do something.
Looks like you want Delegates and Events
http://www.functionx.com/vccli/general/events.htm

i want to pass a argument to a button.
the situation like this..


public:System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
add(a,b);

}
a and b are the variable i want to pass, how can i deal with it??
Sorry, but this makes no sense to me.

Anyway, back to work...
Thank you very much!!!
I'll try this!!!
Topic archived. No new replies allowed.