Click here to Skip to main content
15,894,460 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Creating a Number Spiral Matrix [VC++] Pin
CPallini16-Mar-08 22:24
mveCPallini16-Mar-08 22:24 
GeneralRe: Creating a Number Spiral Matrix [VC++] Pin
Maxwell Chen16-Mar-08 22:35
Maxwell Chen16-Mar-08 22:35 
GeneralRe: Creating a Number Spiral Matrix [VC++] Pin
Randor 17-Mar-08 4:22
professional Randor 17-Mar-08 4:22 
Generaldo{} while (0) Pin
flyingxu16-Mar-08 19:32
flyingxu16-Mar-08 19:32 
GeneralRe: do{} while (0) Pin
Maxwell Chen16-Mar-08 20:23
Maxwell Chen16-Mar-08 20:23 
GeneralRe: do{} while (0) Pin
BadKarma17-Mar-08 0:05
BadKarma17-Mar-08 0:05 
GeneralRe: do{} while (0) Pin
flyingxu17-Mar-08 15:30
flyingxu17-Mar-08 15:30 
QuestionBorland C++ Builder multiple forms problem Pin
Linardi16-Mar-08 19:29
Linardi16-Mar-08 19:29 
Hi, I'm currently using Borland C++ Builder 6.0 right, and since I'm still a beginner in using this tool, I find many difficulties in using this tool...

I wanted to make multiple forms that could communicate with each other, but I still can't make it...

It's probably a silly question, but I'm trying to get the input from the pop-up window and display it at the main window... But I still can't figure the right way to do it... I wrote the program like the following (Note : Form1 is the main window, and Form2 is the pop-up window)

Where, form1 has 2 button, which is btnInput(to show the pop-up window) and btnClose (to close the application), meanwhile form2 has 2 button, which is btnOK (to retrieve the input and close the pop-up window) and btnCancel (just close the pop-up window)

//---------------------------------------------------------------------------

#include <vcl.h>;
#pragma hdrstop

#include "Main.h"
#include "PopUp.cpp"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
TForm2 *Form2;

String input;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{

}

//---------------------------------------------------------------------------

void __fastcall TForm1::btnInputClick(TObject *Sender)
{
Form2->ShowModal();
}
//---------------------------------------------------------------------------

void __fastcall TForm1::btnCloseClick(TObject *Sender)
{
this->Close();
}
//---------------------------------------------------------------------------

void __fastcall TForm2::btnOKClick(TObject *Sender)
{
input = Form2->Edit1->Text;
Form1->lblInput->Caption = input;
this->Close();
}
//---------------------------------------------------------------------------

void __fastcall TForm2::btnCancelClick(TObject *Sender)
{
this->Close();
}
//---------------------------------------------------------------------------

Is there anyone who could help, pleaseee...
GeneralRe: Borland C++ Builder multiple forms problem Pin
Maxwell Chen16-Mar-08 20:30
Maxwell Chen16-Mar-08 20:30 
QuestionAbout p2p communication Pin
manish.patel16-Mar-08 19:16
manish.patel16-Mar-08 19:16 
Generalprecondition and post condition check Pin
George_George16-Mar-08 16:16
George_George16-Mar-08 16:16 
GeneralRe: precondition and post condition check Pin
Stephen Hewitt16-Mar-08 17:26
Stephen Hewitt16-Mar-08 17:26 
GeneralRe: precondition and post condition check Pin
George_George16-Mar-08 19:48
George_George16-Mar-08 19:48 
GeneralRe: precondition and post condition check Pin
Stephen Hewitt16-Mar-08 19:57
Stephen Hewitt16-Mar-08 19:57 
GeneralRe: precondition and post condition check Pin
George_George16-Mar-08 20:01
George_George16-Mar-08 20:01 
GeneralRe: precondition and post condition check Pin
Stephen Hewitt16-Mar-08 20:05
Stephen Hewitt16-Mar-08 20:05 
GeneralRe: precondition and post condition check Pin
George_George16-Mar-08 20:14
George_George16-Mar-08 20:14 
GeneralRe: precondition and post condition check Pin
Stephen Hewitt16-Mar-08 20:23
Stephen Hewitt16-Mar-08 20:23 
GeneralRe: precondition and post condition check Pin
George_George16-Mar-08 20:48
George_George16-Mar-08 20:48 
QuestionRe: precondition and post condition check Pin
CPallini16-Mar-08 22:59
mveCPallini16-Mar-08 22:59 
GeneralRe: precondition and post condition check Pin
Stephen Hewitt17-Mar-08 13:05
Stephen Hewitt17-Mar-08 13:05 
GeneralRe: precondition and post condition check Pin
CPallini17-Mar-08 22:07
mveCPallini17-Mar-08 22:07 
GeneralRe: precondition and post condition check Pin
CPallini16-Mar-08 22:38
mveCPallini16-Mar-08 22:38 
GeneralRe: precondition and post condition check Pin
George_George16-Mar-08 22:48
George_George16-Mar-08 22:48 
GeneralRe: precondition and post condition check Pin
CPallini16-Mar-08 22:50
mveCPallini16-Mar-08 22:50 

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.