Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ON_COMMAND pls HELP

Status
Not open for further replies.

Bodrum81

Programmer
Nov 5, 2003
29
DE
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top