Click here to Skip to main content
15,911,035 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: File association and unique program execution Pin
Zoylamb2-Feb-09 6:03
Zoylamb2-Feb-09 6:03 
Questioncalling new form Pin
Thilek1-Feb-09 21:22
Thilek1-Feb-09 21:22 
AnswerRe: calling new form Pin
«_Superman_»1-Feb-09 22:07
professional«_Superman_»1-Feb-09 22:07 
GeneralRe: calling new form Pin
Thilek1-Feb-09 22:26
Thilek1-Feb-09 22:26 
AnswerRe: calling new form Pin
Iain Clarke, Warrior Programmer1-Feb-09 22:53
Iain Clarke, Warrior Programmer1-Feb-09 22:53 
GeneralRe: calling new form Pin
Thilek2-Feb-09 0:01
Thilek2-Feb-09 0:01 
GeneralRe: calling new form Pin
Iain Clarke, Warrior Programmer2-Feb-09 0:45
Iain Clarke, Warrior Programmer2-Feb-09 0:45 
GeneralRe: calling new form Pin
Thilek2-Feb-09 1:12
Thilek2-Feb-09 1:12 
ok.. so hows i should call the other form..

Below is the coding for the first form and second form.. i need to call the form 2 from this form when i click Button1. help me plz...
______________________________________________________________________
Form 1

// Spartamenu.cpp : implementation file
//

#include "stdafx.h"
#include "Sparta.h"
#include "Spartamenu.h"


IMPLEMENT_DYNAMIC(Spartamenu, CDialog)

Spartamenu::Spartamenu(CWnd* pParent /*=NULL*/)
: CDialog(Spartamenu::IDD, pParent)
{

}

Spartamenu::~Spartamenu()
{
}


void Spartamenu::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
}


BEGIN_MESSAGE_MAP(Spartamenu, CDialog)

ON_BN_CLICKED(IDCANCEL, &Spartamenu::OnBnClickedCancel)
ON_BN_CLICKED(IDC_BUTTON1, &Spartamenu::OnBnClickedButton1)
END_MESSAGE_MAP()


void Spartamenu::OnBnClickedCancel()
{
// TODO: Add your control notification handler code here
OnCancel();
}

void Spartamenu::OnBnClickedButton1()
{
// TODO: Add your control notification handler code here
CDialog::SetTimer(IDD_AUTO,1,NULL);
DestroyWindow();
}
____________________________________________________________________

Form2

// Auto.cpp : implementation file
//

#include "stdafx.h"
#include "Sparta.h"
#include "Auto.h"


// Auto dialog

IMPLEMENT_DYNAMIC(Auto, CDialog)

Auto::Auto(CWnd* pParent /*=NULL*/)
: CDialog(Auto::IDD, pParent)
{

}

Auto::~Auto()
{
}

void Auto::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
}


BEGIN_MESSAGE_MAP(Auto, CDialog)
ON_BN_CLICKED(IDCANCEL, &Auto::OnBnClickedCancel)
ON_BN_CLICKED(IDOK, &Auto::OnBnClickedOk)
ON_LBN_SELCHANGE(IDC_LIST1, &Auto::OnLbnSelchangeList1)
END_MESSAGE_MAP()


// Auto message handlers
int Auto::DoModal()
{

}

void Auto::OnBnClickedCancel()
{
// TODO: Add your control notification handler code here
OnCancel();
}

void Auto::OnBnClickedOk()
{
// TODO: Add your control notification handler code here
OnOK();
}

void Auto::OnLbnSelchangeList1()
{
// TODO: Add your control notification handler code here
}
_____________________________________________________________________
GeneralRe: calling new form Pin
Iain Clarke, Warrior Programmer2-Feb-09 2:02
Iain Clarke, Warrior Programmer2-Feb-09 2:02 
Questionread single line using CFile? Pin
sam_psycho1-Feb-09 19:38
sam_psycho1-Feb-09 19:38 
AnswerRe: read single line using CFile? Pin
Chandrasekharan P1-Feb-09 19:58
Chandrasekharan P1-Feb-09 19:58 
GeneralRe: read single line using CFile? Pin
sam_psycho1-Feb-09 20:07
sam_psycho1-Feb-09 20:07 
AnswerRe: read single line using CFile? Pin
Nishad S1-Feb-09 20:16
Nishad S1-Feb-09 20:16 
AnswerRe: read single line using CFile? Pin
CPallini1-Feb-09 21:34
mveCPallini1-Feb-09 21:34 
GeneralRe: read single line using CFile? Pin
sam_psycho1-Feb-09 21:40
sam_psycho1-Feb-09 21:40 
GeneralRe: read single line using CFile? Pin
sam_psycho1-Feb-09 23:02
sam_psycho1-Feb-09 23:02 
GeneralRe: read single line using CFile? Pin
Iain Clarke, Warrior Programmer1-Feb-09 23:13
Iain Clarke, Warrior Programmer1-Feb-09 23:13 
GeneralRe: read single line using CFile? Pin
CPallini1-Feb-09 23:51
mveCPallini1-Feb-09 23:51 
JokeRe: read single line using CFile? Pin
Iain Clarke, Warrior Programmer1-Feb-09 23:58
Iain Clarke, Warrior Programmer1-Feb-09 23:58 
JokeRe: read single line using CFile? Pin
CPallini2-Feb-09 0:23
mveCPallini2-Feb-09 0:23 
GeneralRe: read single line using CFile? Pin
Roger Stoltz2-Feb-09 1:28
Roger Stoltz2-Feb-09 1:28 
QuestionVista registry virtualisation issue when running my application Pin
hariakuthota1-Feb-09 19:08
hariakuthota1-Feb-09 19:08 
AnswerRe: Vista registry virtualisation issue when running my application Pin
«_Superman_»1-Feb-09 19:12
professional«_Superman_»1-Feb-09 19:12 
GeneralRe: Vista registry virtualisation issue when running my application Pin
hariakuthota1-Feb-09 19:16
hariakuthota1-Feb-09 19:16 
GeneralRe: Vista registry virtualisation issue when running my application Pin
«_Superman_»1-Feb-09 19:28
professional«_Superman_»1-Feb-09 19:28 

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.