Click here to Skip to main content
15,891,864 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Dialog Handle Pin
David Crow3-Dec-04 2:26
David Crow3-Dec-04 2:26 
GeneralC++ dll into visual basic - expert needed! Pin
hemenders2-Dec-04 13:38
hemenders2-Dec-04 13:38 
Generaldetermine the menu option selected Pin
Araj012-Dec-04 12:23
Araj012-Dec-04 12:23 
GeneralRe: determine the menu option selected Pin
Maximilien2-Dec-04 12:31
Maximilien2-Dec-04 12:31 
GeneralRe: determine the menu option selected Pin
Araj012-Dec-04 12:37
Araj012-Dec-04 12:37 
GeneralRe: determine the menu option selected Pin
Maximilien2-Dec-04 13:50
Maximilien2-Dec-04 13:50 
GeneralRe: determine the menu option selected Pin
David Crow3-Dec-04 2:32
David Crow3-Dec-04 2:32 
GeneralRe: determine the menu option selected Pin
Araj013-Dec-04 5:54
Araj013-Dec-04 5:54 
BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
{
ON_COMMAND(ID_WAVEFORMSUMMATION_USERDEFINEDGROUPING, OnWaveformsummationUserdefinedgrouping)
ON_COMMAND(ID_WAVEFORMSUMMATION_GP246, OnWaveformsummationGp246)
ON_COMMAND(ID_WAVEFORMSUMMATION_GP123, OnWaveformsummationGp123)
ON_COMMAND(ID_ANALYSE_WAVEFORMDIFF, OnAnalyseWaveformdiff)
}


void CMainFrame::OnWaveformsummationUserdefinedgrouping()
{
SwitchToView(ANALYSEMULWAVEFORM);
}

void CMainFrame::OnWaveformsummationGp246()
{
SwitchToView(ANALYSEMULWAVEFORM);
}

void CMainFrame::OnWaveformsummationGp123()
{
SwitchToView(ANALYSEMULWAVEFORM);

}

void CMainFrame::OnAnalyseWaveformdiff()
{
SwitchToView(ANALYSEMULWAVEFORM);
}

void CMainFrame::SwitchToView(eview nView)
{
CView* pold = GetActiveView();
CView* pnew = (CView*)GetDlgItem(nView);


if(pnew==NULL){
switch(nView){
case SINGLEWAVEFORM:
pnew=(CView*) new CSingleWaveform();
break;
case MULTIPLEWAVEFORM:
pnew=(CView*) new CMultipleWaveform();
break;
case ANALYSEMULWAVEFORM:
pnew=(CView*) new CAnalyseMultipleWaveform();
break;
}
CCreateContext context;
context.m_pCurrentDoc=pold->GetDocument();
pnew->Create(NULL,NULL,WS_CHILD|WS_BORDER|WS_MAXIMIZE,CFrameWnd::rectDefault,this,nView,&context);
pnew->OnInitialUpdate();
}
SetActiveView(pnew);
pnew->ShowWindow(SW_SHOW);
pold->ShowWindow(SW_HIDE);

if(pold->GetRuntimeClass()==RUNTIME_CLASS(CSingleWaveform))
pold->SetDlgCtrlID(SINGLEWAVEFORM);
else if(pold->GetRuntimeClass()==RUNTIME_CLASS(CMultipleWaveform))
pold->SetDlgCtrlID(MULTIPLEWAVEFORM);
else if(pold->GetRuntimeClass()==RUNTIME_CLASS(CAnalyseMultipleWaveform))
pold->SetDlgCtrlID(ANALYSEMULWAVEFORM);

pnew->SetDlgCtrlID(AFX_IDW_PANE_FIRST);
RecalcLayout();
}

this is how my code is.when the child window is created i dont know from which menu option this child window is opened. please guide me through. Now in class CAnalyseMultipleWaveform i would like to know which menu option was selected.

thanks.
GeneralRe: determine the menu option selected Pin
David Crow3-Dec-04 7:53
David Crow3-Dec-04 7:53 
GeneralRe: determine the menu option selected Pin
Araj013-Dec-04 7:58
Araj013-Dec-04 7:58 
GeneralRe: determine the menu option selected Pin
David Crow3-Dec-04 8:17
David Crow3-Dec-04 8:17 
GeneralRe: determine the menu option selected Pin
Araj013-Dec-04 8:28
Araj013-Dec-04 8:28 
GeneralRe: determine the menu option selected Pin
David Crow3-Dec-04 9:01
David Crow3-Dec-04 9:01 
GeneralRe: determine the menu option selected Pin
Araj013-Dec-04 9:28
Araj013-Dec-04 9:28 
GeneralRe: determine the menu option selected Pin
David Crow3-Dec-04 9:31
David Crow3-Dec-04 9:31 
Generaldsp-file for Visual Studio 6.0 Pin
Reinhold442-Dec-04 11:01
Reinhold442-Dec-04 11:01 
Generalkilled for free std::string, Help please. I will give rate Pin
LongIsland2-Dec-04 10:48
LongIsland2-Dec-04 10:48 
GeneralRe: killed for free std::string, Help please. I will give rate Pin
John R. Shaw2-Dec-04 15:08
John R. Shaw2-Dec-04 15:08 
GeneralRe: killed for free std::string, Help please. I will give rate Pin
Maximilien2-Dec-04 16:19
Maximilien2-Dec-04 16:19 
Generalremoving the Main Frame title bar in a SDI Pin
kdehairy2-Dec-04 10:42
kdehairy2-Dec-04 10:42 
GeneralRe: removing the Main Frame title bar in a SDI Pin
David Crow2-Dec-04 10:45
David Crow2-Dec-04 10:45 
GeneralRe: removing the Main Frame title bar in a SDI Pin
kdehairy2-Dec-04 10:54
kdehairy2-Dec-04 10:54 
GeneralRe: removing the Main Frame title bar in a SDI Pin
Graham Bradshaw2-Dec-04 11:03
Graham Bradshaw2-Dec-04 11:03 
GeneralRe: removing the Main Frame title bar in a SDI Pin
kdehairy2-Dec-04 22:08
kdehairy2-Dec-04 22:08 
GeneralWhy this code alway crash my app?Need help. Pin
Teerayoot2-Dec-04 9:47
Teerayoot2-Dec-04 9:47 

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.