hi
i had converted a vb code to vc++ /MFC code through a VBto converter application.but when i compiled it i got an error in this function:

void CForm1::OnCommand1()
{
	// TODO: Add your control notification handler code here
	 CComVariant retval;	// - "AutoDim"

	 CString app_path;
	 CString Icon;
     
	app_path = Str(App.path)+CString("\\")+Str(App.EXEName)+".exe";
	Icon = Str(App.path)+CString("\\")+"book.ico";

	retval = Associate_File(".abd", app_path, "abd_ext", "My own extension", Icon);
	AfxMessageBox(("Associated the file extension .abd with this application!"));

}

saying that :
error C2065: 'App' : undeclared identifier
error C2228: left of '.EXEName' must have class/struct/union type
"as will as for the App.path"

i understand that App is aclass in vb . so, Is ther any equivalent class for it in vc++?if not.... can someone pleeeeease help to fix this ?
any help eill be appreciated .
thanks in advance.

Every MFC program has an object named theApp which is derived from CWinApp. Maybe that is what it is looking for ??? theApp is declared in <project name>.cpp near the top of the file.

You can also access it by calling the function AfxGetApp()

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.