Click here to Skip to main content
15,908,115 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionVisual C++6, MFC, Crystal Reports Pin
123.RahulS10-Oct-06 22:30
123.RahulS10-Oct-06 22:30 
Question"Cannot execute program" Pin
kiranin10-Oct-06 21:56
kiranin10-Oct-06 21:56 
AnswerRe: "Cannot execute program" Pin
Hamid_RT10-Oct-06 22:02
Hamid_RT10-Oct-06 22:02 
GeneralRe: "Cannot execute program" Pin
kiranin10-Oct-06 22:15
kiranin10-Oct-06 22:15 
GeneralRe: "Cannot execute program" Pin
toxcct10-Oct-06 22:20
toxcct10-Oct-06 22:20 
GeneralRe: "Cannot execute program" Pin
kiranin10-Oct-06 23:42
kiranin10-Oct-06 23:42 
GeneralRe: "Cannot execute program" Pin
toxcct10-Oct-06 23:53
toxcct10-Oct-06 23:53 
GeneralRe: "Cannot execute program" Pin
kiranin10-Oct-06 23:56
kiranin10-Oct-06 23:56 
BOOL CIFlappApp::InitInstance()<br />
{<br />
	AfxEnableControlContainer();<br />
<br />
	// Standard initialization<br />
	// If you are not using these features and wish to reduce the size<br />
	//  of your final executable, you should remove from the following<br />
	//  the specific initialization routines you do not need.<br />
<br />
#ifdef _AFXDLL<br />
	Enable3dControls();			// Call this when using MFC in a shared DLL<br />
#else<br />
	Enable3dControlsStatic();	// Call this when linking to MFC statically<br />
#endif<br />
<br />
	// Change the registry key under which our settings are stored.<br />
	// TODO: You should modify this string to be something appropriate<br />
	// such as the name of your company or organization.<br />
	//<br />
	<br />
	SetRegistryKey(_T("Local AppWizard-Generated Applications"));<br />
<br />
	LoadStdProfileSettings();  // Load standard INI file options (including MRU)<br />
<br />
	// Register the application's document templates.  Document templates<br />
	//  serve as the connection between documents, frame windows and views.<br />
<br />
	CSingleDocTemplate* pDocTemplate;<br />
	pDocTemplate = new CSingleDocTemplate(<br />
		IDR_MAINFRAME,<br />
		RUNTIME_CLASS(CIFlappDoc),<br />
		RUNTIME_CLASS(CMainFrame),       // main SDI frame window<br />
		RUNTIME_CLASS(CIFlappView));<br />
	AddDocTemplate(pDocTemplate);<br />
<br />
	// Parse command line for standard shell commands, DDE, file open<br />
	CCommandLineInfo cmdInfo;<br />
	ParseCommandLine(cmdInfo);<br />
<br />
		// Include the class header in your file<br />
	// Give the path of the image and the transparent color<br />
	CSplash splash1(TEXT(".\\IFlapp.bmp"), RGB(128, 128, 128));<br />
<br />
	//  Display the splash<br />
	splash1.ShowSplash();<br />
	Sleep(1000); //  simulate using a 5 second delay<br />
<br />
	// your start up initialization code goes here<br />
<br />
	// Close the splash screen<br />
	splash1.CloseSplash();	<br />
<br />
	<br />
	m_pMsi =  new CMsiInterface();<br />
	m_pIFile = new CFileInterface();<br />
	m_pIReg = new CRegInterface();<br />
<br />
	char buffer[_MAX_PATH];<br />
	::GetModuleFileName (NULL, buffer, _MAX_PATH);<br />
<br />
	<br />
	m_strAppPath = (CString(buffer).Left(CString(buffer).ReverseFind('\\')+1));<br />
	m_strAppDrive = FindDrive(m_strAppPath);<br />
<br />
#ifdef _DEBUG<br />
	//m_strAppDrive = "G";<br />
#endif<br />
<br />
	m_lAppCount = 0;<br />
	CString strDrive = m_strAppDrive;<br />
	strDrive += ":";<br />
	CSecureUSB secUSB;<br />
	secUSB.SetPath(strDrive);<br />
	if(secUSB.InitWMI())<br />
	{<br />
		secUSB.ConnectWMI();<br />
		secUSB.GenerateHash();<br />
		//if(secUSB.VerifyHash() == false)<br />
	//	{<br />
		//	AfxMessageBox("This copy of IntelliDrive Application is not valid");<br />
		//	return FALSE;<br />
	//	}<br />
	}<br />
	else<br />
	{<br />
		return FALSE;<br />
	}<br />
	<br />
	// Dispatch commands specified on the command line<br />
	if (!ProcessShellCommand(cmdInfo))<br />
		return FALSE;<br />
<br />
	// The one and only window has been initialized, so show and update it.<br />
	m_pMainWnd->ShowWindow(SW_SHOW);<br />
	m_pMainWnd->UpdateWindow();<br />
<br />
	return TRUE;<br />
}

GeneralRe: "Cannot execute program" Pin
toxcct11-Oct-06 0:02
toxcct11-Oct-06 0:02 
GeneralRe: "Cannot execute program" Pin
kiranin11-Oct-06 0:07
kiranin11-Oct-06 0:07 
AnswerRe: "Cannot execute program" Pin
toxcct10-Oct-06 22:05
toxcct10-Oct-06 22:05 
QuestionRe: &amp;quot;Cannot execute program&amp;quot; Pin
David Crow11-Oct-06 7:53
David Crow11-Oct-06 7:53 
GeneralRe: &quot;Cannot execute program&quot; Pin
kiranin11-Oct-06 9:26
kiranin11-Oct-06 9:26 
Questiondatabase problem Pin
With_problem10-Oct-06 21:52
With_problem10-Oct-06 21:52 
AnswerRe: database problem Pin
David Crow11-Oct-06 7:56
David Crow11-Oct-06 7:56 
Questionchanging color of text in a row in CListCtrl Pin
Kiran Pinjala10-Oct-06 21:03
Kiran Pinjala10-Oct-06 21:03 
AnswerRe: changing color of text in a row in CListCtrl Pin
Hamid_RT10-Oct-06 21:26
Hamid_RT10-Oct-06 21:26 
AnswerRe: changing color of text in a row in CListCtrl Pin
Rajesh R Subramanian10-Oct-06 21:26
professionalRajesh R Subramanian10-Oct-06 21:26 
Questionping a remote server Pin
Anik3310-Oct-06 20:53
Anik3310-Oct-06 20:53 
AnswerRe: ping a remote server Pin
David Crow11-Oct-06 7:59
David Crow11-Oct-06 7:59 
GeneralRe: ping a remote server Pin
Galatei11-Oct-06 23:18
Galatei11-Oct-06 23:18 
Questionhow can get words form screen Pin
zh.w10-Oct-06 20:35
zh.w10-Oct-06 20:35 
AnswerRe: how can get words form screen Pin
Hamid_RT10-Oct-06 20:44
Hamid_RT10-Oct-06 20:44 
GeneralRe: how can get words form screen [modified] Pin
zh.w10-Oct-06 21:04
zh.w10-Oct-06 21:04 
GeneralRe: how can get words form screen Pin
Hamid_RT10-Oct-06 21:26
Hamid_RT10-Oct-06 21:26 

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.