Click here to Skip to main content
15,900,110 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: SQL and C++ Pin
Steve S11-Oct-02 6:13
Steve S11-Oct-02 6:13 
GeneralReally strange string error Pin
will138311-Oct-02 5:12
will138311-Oct-02 5:12 
GeneralRe: Really strange string error Pin
jmkhael11-Oct-02 5:17
jmkhael11-Oct-02 5:17 
GeneralRe: Really strange string error Pin
Daniel Turini11-Oct-02 5:22
Daniel Turini11-Oct-02 5:22 
QuestionWhat the Heck? Pin
Ryan B.11-Oct-02 4:51
Ryan B.11-Oct-02 4:51 
AnswerRe: What the Heck? Pin
Steve S11-Oct-02 6:08
Steve S11-Oct-02 6:08 
AnswerRe: What the Heck? Pin
MaximE12-Oct-02 11:54
MaximE12-Oct-02 11:54 
Generala terrible problem! help! Pin
ns11-Oct-02 4:11
ns11-Oct-02 4:11 
I ran a sample app for a splash screen, and now even though other apps are okay, my main app is crashing at !ProcessShellCommand(cmdInfo) whivch I stepped into, and its at the switch:

BOOL CWinApp::ProcessShellCommand(CCommandLineInfo& rCmdInfo)
{
	BOOL bResult = TRUE;
	switch (rCmdInfo.m_nShellCommand)
	{


Another mfc program does fine! The sample I ran had a file pair: cmdline.cpp and .h.
Here are its contents:
#include "stdafx.h"
#include "cmdline.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

//////////////////
// Parse a command line parameter/token. Just add it to the table.
// 
void CCommandLineInfoEx::ParseParam(const TCHAR* pszParam, BOOL bFlag, BOOL bLast)
{
	if (bFlag) {
		// this is a "flag" (begins with / or -)
		m_options[pszParam] = "TRUE";		// default value is "TRUE"
		m_sLastOption = pszParam;			// save in case other value specified

	} else if (!m_sLastOption.IsEmpty()) {
		// last token was option: set value
		m_options[m_sLastOption] = pszParam;
		m_sLastOption.Empty(); // clear
	}

	// Call base class so MFC can see this param/token.
	CCommandLineInfo::ParseParam(pszParam, bFlag, bLast);
}

BOOL CCommandLineInfoEx::GetOption(LPCTSTR option, CString& val)
{
	return m_options.Lookup(option, val);
}


I dont know whats gone wrong, but none of my saved versions are working, and I know for a fact they were before I ran this sample. I actually ran another splashscreen app too, but it didnt have a file called cmdline.* (if thats the problem).

Help! I am devastated! What has gone wrong on my machine?


Appreciate your help,
ns
GeneralRe: a terrible problem! help! Pin
ns11-Oct-02 5:01
ns11-Oct-02 5:01 
GeneralRe: a terrible problem! help! Pin
Joaquín M López Muñoz11-Oct-02 5:22
Joaquín M López Muñoz11-Oct-02 5:22 
GeneralRe: a terrible problem! help! Pin
ns11-Oct-02 5:34
ns11-Oct-02 5:34 
GeneralRe: a terrible problem! help! Pin
Joaquín M López Muñoz11-Oct-02 5:36
Joaquín M López Muñoz11-Oct-02 5:36 
GeneralRe: a terrible problem! help! Pin
ns11-Oct-02 5:56
ns11-Oct-02 5:56 
GeneralRe: a terrible problem! help! Pin
ns11-Oct-02 6:00
ns11-Oct-02 6:00 
GeneralRe: a terrible problem! help! Pin
Joaquín M López Muñoz11-Oct-02 6:00
Joaquín M López Muñoz11-Oct-02 6:00 
Generalupdate! Pin
ns15-Oct-02 3:14
ns15-Oct-02 3:14 
GeneralStoring additional data in MsWord 2000/XP file Pin
mariuszpopiolek11-Oct-02 4:06
mariuszpopiolek11-Oct-02 4:06 
GeneralCount appl in DLL Pin
Raphael Kindt11-Oct-02 3:21
Raphael Kindt11-Oct-02 3:21 
GeneralRe: Count appl in DLL Pin
Jon Hulatt11-Oct-02 3:44
Jon Hulatt11-Oct-02 3:44 
GeneralRe: Count appl in DLL Pin
Raphael Kindt11-Oct-02 4:10
Raphael Kindt11-Oct-02 4:10 
GeneralRe: Count appl in DLL Pin
Jon Hulatt11-Oct-02 4:25
Jon Hulatt11-Oct-02 4:25 
GeneralRe: Count appl in DLL Pin
Raphael Kindt11-Oct-02 4:40
Raphael Kindt11-Oct-02 4:40 
GeneralRe: Count appl in DLL Pin
Steve S11-Oct-02 6:27
Steve S11-Oct-02 6:27 
GeneralRe: Count appl in DLL Pin
Paul M Watt11-Oct-02 5:47
mentorPaul M Watt11-Oct-02 5:47 
GeneralRe: Count appl in DLL Pin
Daniel Lohmann11-Oct-02 13:45
Daniel Lohmann11-Oct-02 13:45 

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.