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.

10 Years
Discussion Span
Last Post by Ancient Dragon

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()

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.