Click here to Skip to main content
15,901,426 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Menu Notifications on MFC Pin
David Crow11-Jan-08 2:21
David Crow11-Jan-08 2:21 
GeneralRe: Menu Notifications on MFC Pin
blackbondi11-Jan-08 4:39
blackbondi11-Jan-08 4:39 
GeneralRe: Menu Notifications on MFC Pin
blackbondi11-Jan-08 0:25
blackbondi11-Jan-08 0:25 
GeneralRe: Menu Notifications on MFC Pin
Hamid_RT10-Jan-08 20:01
Hamid_RT10-Jan-08 20:01 
GeneralRe: Menu Notifications on MFC Pin
blackbondi10-Jan-08 23:50
blackbondi10-Jan-08 23:50 
GeneralRe: Menu Notifications on MFC Pin
Hamid_RT11-Jan-08 5:39
Hamid_RT11-Jan-08 5:39 
QuestionHandling command message for dynamic menu Pin
blackbondi10-Jan-08 8:30
blackbondi10-Jan-08 8:30 
QuestionHow to communicate between two Windows Forms in Visual C++ 2005 in BOTH directions???? Pin
szymon7910-Jan-08 7:34
szymon7910-Jan-08 7:34 
I need help with following problem:

I created new project with two Windows Forms called Form1 and Form2. Now, I put on each Form one Button and one Text Box.

The main Form is Form1 which I start the program. When I click Button1, Form2 shows and into Textbox1 in Form2 it puts some text. To do this in Form1 I added code:

#include "Form2.h"
...
private: Form2^ form2;
...
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e)
{
form2 = gcnew Form2();
forma2->textBox1->Text="sometext";
forma2->Show();

}
Everything works fine, but..... Now I want do the same in opposite direction. I want to click on Button1 on Form2 and put some text into textbox1 on Form1. How to do this????

I cannot add in Form2 #include "Form1" because it will not compile(There are some errors)

Please help me with this "simple" problem.

Best regards
Szymon
GeneralRe: How to communicate between two Windows Forms in Visual C++ 2005 in BOTH directions???? Pin
led mike10-Jan-08 7:58
led mike10-Jan-08 7:58 
GeneralRe: How to communicate between two Windows Forms in Visual C++ 2005 in BOTH directions???? Pin
szymon7910-Jan-08 8:07
szymon7910-Jan-08 8:07 
GeneralRe: How to communicate between two Windows Forms in Visual C++ 2005 in BOTH directions???? Pin
led mike10-Jan-08 8:23
led mike10-Jan-08 8:23 
GeneralRe: How to communicate between two Windows Forms in Visual C++ 2005 in BOTH directions???? Pin
Mark Salsbery10-Jan-08 8:00
Mark Salsbery10-Jan-08 8:00 
GeneralRe: How to communicate between two Windows Forms in Visual C++ 2005 in BOTH directions???? Pin
led mike10-Jan-08 8:25
led mike10-Jan-08 8:25 
GeneralRe: How to communicate between two Windows Forms in Visual C++ 2005 in BOTH directions???? Pin
Mark Salsbery10-Jan-08 8:30
Mark Salsbery10-Jan-08 8:30 
GeneralRe: How to communicate between two Windows Forms in Visual C++ 2005 in BOTH directions???? Pin
led mike10-Jan-08 10:05
led mike10-Jan-08 10:05 
GeneralRe: How to communicate between two Windows Forms in Visual C++ 2005 in BOTH directions???? Pin
Mark Salsbery10-Jan-08 11:14
Mark Salsbery10-Jan-08 11:14 
GeneralRe: How to communicate between two Windows Forms in Visual C++ 2005 in BOTH directions???? Pin
CPallini10-Jan-08 12:06
mveCPallini10-Jan-08 12:06 
GeneralRe: How to communicate between two Windows Forms in Visual C++ 2005 in BOTH directions???? Pin
Mark Salsbery10-Jan-08 14:08
Mark Salsbery10-Jan-08 14:08 
JokeOK, done. Pin
CPallini10-Jan-08 21:18
mveCPallini10-Jan-08 21:18 
QuestionHow to play MP3 files ? Pin
AprNgp10-Jan-08 6:49
AprNgp10-Jan-08 6:49 
GeneralRe: How to play MP3 files ? Pin
Hamid_RT10-Jan-08 6:54
Hamid_RT10-Jan-08 6:54 
GeneralCalling .NET DLL from MFC app Pin
hairy_hats10-Jan-08 4:27
hairy_hats10-Jan-08 4:27 
GeneralRe: Calling .NET DLL from MFC app Pin
jhwurmbach10-Jan-08 4:45
jhwurmbach10-Jan-08 4:45 
GeneralRe: Calling .NET DLL from MFC app Pin
hairy_hats10-Jan-08 4:49
hairy_hats10-Jan-08 4:49 
GeneralRe: Calling .NET DLL from MFC app Pin
jhwurmbach10-Jan-08 4:56
jhwurmbach10-Jan-08 4:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.