Click here to Skip to main content
15,921,382 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: show txt file Pin
Anders Molin17-Nov-01 6:41
professionalAnders Molin17-Nov-01 6:41 
GeneralRe: show txt file Pin
mazy17-Nov-01 7:23
mazy17-Nov-01 7:23 
GeneralRe: show txt file Pin
Anders Molin17-Nov-01 9:31
professionalAnders Molin17-Nov-01 9:31 
GeneralRe: show txt file Pin
Carlos Antollini19-Nov-01 8:11
Carlos Antollini19-Nov-01 8:11 
GeneralRe: show txt file Pin
Michael Dunn17-Nov-01 9:06
sitebuilderMichael Dunn17-Nov-01 9:06 
GeneralRe: show txt file Pin
Bill Wilson19-Nov-01 8:04
Bill Wilson19-Nov-01 8:04 
Generalget a pointer to the document Pin
sport17-Nov-01 5:25
sport17-Nov-01 5:25 
GeneralRe: get a pointer to the document Pin
Christian Skovdal Andersen17-Nov-01 5:57
Christian Skovdal Andersen17-Nov-01 5:57 
I have'nt tried the solution you suggest, and I don't know why it fails. But since the document has nothing to do with the frame class, you should obtain it from the Application class. Copy and paste this code into you CMyApp class:

CCommixDoc* CCommixApp::GetActiveDocument()
{
	POSITION pos = GetFirstDocTemplatePosition();
	ASSERT(pos);

	CDocTemplate* pTempl = GetNextDocTemplate(pos);
	ASSERT(pTempl);


	pos = pTempl->GetFirstDocPosition();
	ASSERT(pos);
	if (pos==NULL)
	{
		return NULL;
	}

	return (CCommixDoc *)pTempl->GetNextDoc(pos);

}


Christian Skovdal Andersen

"I have a plan so cunning you could put a tail
on it and call it a weasel." -Edmund, Blackadder III

GeneralRe: get a pointer to the document Pin
sport17-Nov-01 9:21
sport17-Nov-01 9:21 
GeneralRe: get a pointer to the document Pin
Christian Skovdal Andersen17-Nov-01 23:39
Christian Skovdal Andersen17-Nov-01 23:39 
GeneralRe: get a pointer to the document Pin
sport18-Nov-01 23:39
sport18-Nov-01 23:39 
GeneralRe: get a pointer to the document Pin
Christian Graus18-Nov-01 0:53
protectorChristian Graus18-Nov-01 0:53 
GeneralRe: get a pointer to the document Pin
sport18-Nov-01 23:22
sport18-Nov-01 23:22 
GeneralRe: get a pointer to the document Pin
Tim Deveaux18-Nov-01 3:48
Tim Deveaux18-Nov-01 3:48 
GeneralRe: get a pointer to the document Pin
sport18-Nov-01 23:25
sport18-Nov-01 23:25 
GeneralRe: get a pointer to the document Pin
Tim Deveaux21-Nov-01 13:43
Tim Deveaux21-Nov-01 13:43 
QuestionMS Flight Simulator modules...? Pin
17-Nov-01 5:24
suss17-Nov-01 5:24 
GeneralSetWindowOrg() screws with my layers! Pin
Simon Walton17-Nov-01 5:05
Simon Walton17-Nov-01 5:05 
GeneralRe: SetWindowOrg() screws with my layers! Pin
Simon Walton18-Nov-01 4:30
Simon Walton18-Nov-01 4:30 
QuestionHowto set background color on single char in CRichText? Pin
17-Nov-01 2:16
suss17-Nov-01 2:16 
AnswerRe: Howto set background color on single char in CRichText? Pin
17-Nov-01 2:28
suss17-Nov-01 2:28 
GeneralATL/WTL CHeaderCtrl Pin
Canopener17-Nov-01 2:04
Canopener17-Nov-01 2:04 
GeneralTooltips problem ! Pin
Hadi Rezaee17-Nov-01 1:59
Hadi Rezaee17-Nov-01 1:59 
GeneralRe: Tooltips problem ! Pin
Roger Allen17-Nov-01 2:18
Roger Allen17-Nov-01 2:18 
GeneralRe: Tooltips problem ! Pin
Hadi Rezaee17-Nov-01 5:44
Hadi Rezaee17-Nov-01 5:44 

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.