Click here to Skip to main content
16,005,038 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Database connection through MFC help Pin
Mike Danberg20-Oct-03 6:16
Mike Danberg20-Oct-03 6:16 
GeneralHelp with some C Pin
Sirrius19-Oct-03 11:05
Sirrius19-Oct-03 11:05 
GeneralRe: Help with some C Pin
markkuk19-Oct-03 11:45
markkuk19-Oct-03 11:45 
GeneralRe: Convert int to hexa Pin
Alexander M.,19-Oct-03 10:26
Alexander M.,19-Oct-03 10:26 
GeneralRe: MRU problem Pin
Neville Franks19-Oct-03 9:45
Neville Franks19-Oct-03 9:45 
GeneralRe: MRU problem Pin
YaronNir19-Oct-03 22:47
YaronNir19-Oct-03 22:47 
GeneralRe: MRU problem Pin
Neville Franks19-Oct-03 23:13
Neville Franks19-Oct-03 23:13 
GeneralRe: MRU problem Pin
YaronNir19-Oct-03 23:25
YaronNir19-Oct-03 23:25 
Ok,

i got into the core of the code. look at this:

CDocTemplate::Confidence CDocTemplate::MatchDocType(LPCTSTR lpszPathName,
	CDocument*& rpDocMatch)
{
	ASSERT(lpszPathName != NULL);
	rpDocMatch = NULL;

	// go through all documents
	POSITION pos = GetFirstDocPosition();
	while (pos != NULL)
	{
		CDocument* pDoc = GetNextDoc(pos);
		if (AfxComparePath(pDoc->GetPathName(), lpszPathName))
		{
			// already open
			rpDocMatch = pDoc;
			return <big>yesAlreadyOpen</big>;
		}
	}

	// see if it matches our default suffix
	CString strFilterExt;
	if (GetDocString(strFilterExt, CDocTemplate::filterExt) &&
	  !strFilterExt.IsEmpty())
	{
		// see if extension matches
		ASSERT(strFilterExt[0] == '.');
		LPCTSTR lpszDot = _tcsrchr(lpszPathName, '.');
		if (lpszDot != NULL && lstrcmpi(lpszDot, strFilterExt) == 0)
			return yesAttemptNative; // extension matches, looks like ours
	}

	// otherwise we will guess it may work
	return yesAttemptForeign;
}


this method returns (as i looked at the break point) "yesAlreadyOpen"

that is why nothing happens for me....

i still think i need to set a flag or something....

can u help ???

thanks again

Yaron

Ask not what your application can do for you,
Ask what you can do for your application
GeneralRe: MRU problem Pin
Neville Franks20-Oct-03 0:02
Neville Franks20-Oct-03 0:02 
GeneralRe: MRU problem Pin
YaronNir20-Oct-03 0:14
YaronNir20-Oct-03 0:14 
GeneralRe: MRU problem Pin
Neville Franks20-Oct-03 2:16
Neville Franks20-Oct-03 2:16 
GeneralRe: MRU problem Pin
YaronNir20-Oct-03 2:41
YaronNir20-Oct-03 2:41 
GeneralRe: MRU problem Pin
Neville Franks20-Oct-03 21:16
Neville Franks20-Oct-03 21:16 
GeneralApplication does not terminating Pin
csperber19-Oct-03 7:42
csperber19-Oct-03 7:42 
GeneralRe: Application does not terminating Pin
Neville Franks19-Oct-03 9:47
Neville Franks19-Oct-03 9:47 
GeneralRe: Application does not terminating Pin
csperber20-Oct-03 8:30
csperber20-Oct-03 8:30 
GeneralRe: Application does not terminating Pin
Anthony_Yio20-Oct-03 1:42
Anthony_Yio20-Oct-03 1:42 
GeneralRe: Application does not terminating Pin
csperber20-Oct-03 8:39
csperber20-Oct-03 8:39 
GeneralRe: Application does not terminating Pin
Anthony_Yio20-Oct-03 16:19
Anthony_Yio20-Oct-03 16:19 
GeneralRe: Application does not terminating Pin
Mikey_E15-Nov-03 12:57
professionalMikey_E15-Nov-03 12:57 
Generalgetting AutoDate Pin
pnpfriend19-Oct-03 7:40
pnpfriend19-Oct-03 7:40 
GeneralJava Applets (jar) in MFC resources application Pin
Crercio O. Silva19-Oct-03 7:08
Crercio O. Silva19-Oct-03 7:08 
GeneralRe: Java Applets (jar) in MFC resources application Pin
Johnny ²19-Oct-03 21:47
Johnny ²19-Oct-03 21:47 
GeneralRe: Java Applets (jar) in MFC resources application Pin
Crercio O. Silva20-Oct-03 2:21
Crercio O. Silva20-Oct-03 2:21 
GeneralRe: Java Applets (jar) in MFC resources application Pin
Steve S20-Oct-03 2:23
Steve S20-Oct-03 2:23 

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.