Hello
I need help
I have a MFC-Program
In the Method InitInstance()
I read the CommandLine
and I want to call the ON_COMMAND from the Class MyView
In a Interactive version of my Programm I click on the Menu-Point
Report
-> Open
But I want to Call the Menu-Point Open from the Method
InitInstance()
How Can I realize this?
BOOL MyApp::InitInstance()
{
CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(
IDR_MAINFRAME,
RUNTIME_CLASS(CRDCcpp85Doc),
RUNTIME_CLASS(CMainFrame), RUNTIME_CLASS(CRDCcpp85View));
AddDocTemplate(pDocTemplate);
CMyCmdLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
vConnect = cmdInfo.m_Connect;
vPath = cmdInfo.m_Path;
vLogon = cmdInfo.m_Logon;
vUser = cmdInfo.m_User;
vPassword = cmdInfo.m_Password;
vServer = cmdInfo.m_Server;
if (!ProcessShellCommand(cmdInfo))
return FALSE;
m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->SetWindowText("hrViewer"
;
m_pMainWnd->UpdateWindow();
MyView theView;
theView.OnReportOpen(); //this gives me an error when i run my program
return TRUE;
}
I hope anybody can help me
thanks
Reci
I need help
I have a MFC-Program
In the Method InitInstance()
I read the CommandLine
and I want to call the ON_COMMAND from the Class MyView
In a Interactive version of my Programm I click on the Menu-Point
Report
-> Open
But I want to Call the Menu-Point Open from the Method
InitInstance()
How Can I realize this?
BOOL MyApp::InitInstance()
{
CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(
IDR_MAINFRAME,
RUNTIME_CLASS(CRDCcpp85Doc),
RUNTIME_CLASS(CMainFrame), RUNTIME_CLASS(CRDCcpp85View));
AddDocTemplate(pDocTemplate);
CMyCmdLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
vConnect = cmdInfo.m_Connect;
vPath = cmdInfo.m_Path;
vLogon = cmdInfo.m_Logon;
vUser = cmdInfo.m_User;
vPassword = cmdInfo.m_Password;
vServer = cmdInfo.m_Server;
if (!ProcessShellCommand(cmdInfo))
return FALSE;
m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->SetWindowText("hrViewer"
m_pMainWnd->UpdateWindow();
MyView theView;
theView.OnReportOpen(); //this gives me an error when i run my program
return TRUE;
}
I hope anybody can help me
thanks
Reci