Click here to Skip to main content
15,915,703 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionLength of IStream Pin
CodingLover10-Jun-08 0:18
CodingLover10-Jun-08 0:18 
QuestionCreateThread parameter Pin
rp_suman9-Jun-08 22:23
rp_suman9-Jun-08 22:23 
AnswerRe: CreateThread parameter Pin
Cedric Moonen9-Jun-08 22:26
Cedric Moonen9-Jun-08 22:26 
GeneralRe: CreateThread parameter Pin
rp_suman9-Jun-08 22:41
rp_suman9-Jun-08 22:41 
GeneralRe: CreateThread parameter Pin
jeron110-Jun-08 4:09
jeron110-Jun-08 4:09 
AnswerRe: CreateThread parameter Pin
Joe Woodbury10-Jun-08 6:19
professionalJoe Woodbury10-Jun-08 6:19 
GeneralRe: CreateThread parameter Pin
JudyL_MD10-Jun-08 6:43
JudyL_MD10-Jun-08 6:43 
QuestionOpen a debug view while opening a document Pin
beko9-Jun-08 21:33
beko9-Jun-08 21:33 
Hello,

I have a problem with opening a view, while opening a document (MDI).

What i do is I have a configuration file and when i read it, i can open a debug view (richtextview) and see the details about the configuration. I can import as many as configuration files i want. I can also open a document attached with a configuration file, but cannot open the debug view Smile | :) .

BOOL Test::OnOpenDocument(LPCTSTR lpszPathName)
{
	if (!CDocument::OnOpenDocument(lpszPathName))
		return FALSE;

	CMainFrame* mainWnd = (CMainFrame*)AfxGetMainWnd();

	// Testing debugwindow open
	mainWnd->OnNewwindowDebugwindow();

	Log().inform("Hello !",getDebugWindow());
}


In above code, the mainframe creates a debug window, and getDebugWindow() just finds the debug view if there is any, and in the OpenDocument, it always returns NULL. the question is how i can create a view while opening a document?


CDebugWindow* Test::getDebugWindow()
{
	if(debugWindow==0)
	{
		POSITION pos = GetFirstViewPosition();
		CView* pView=0;
		bool found=false;
		while (pos != NULL)
		{
		  pView = GetNextView(pos);
		  if(pView->IsKindOf(RUNTIME_CLASS(CDebugWindow)))
		  {
			  found=true;
			  break;
		  }
		  // pView->UpdateWindow();
		}   

		if(found)
		{
			debugWindow = (CDebugWindow*) pView;
			return debugWindow;
		}
		else
			return 0;
	}
	else
		return debugWindow;

}


Thanks in advance.

Bekir.
QuestionWeird windows problem Pin
mihai1239-Jun-08 21:14
mihai1239-Jun-08 21:14 
AnswerRe: Weird windows problem Pin
Michael Schubert9-Jun-08 22:18
Michael Schubert9-Jun-08 22:18 
AnswerRe: Weird windows problem Pin
mihai1239-Jun-08 22:37
mihai1239-Jun-08 22:37 
AnswerRe: Weird windows problem Pin
krmed10-Jun-08 1:53
krmed10-Jun-08 1:53 
GeneralRe: Weird windows problem Pin
mihai12310-Jun-08 3:08
mihai12310-Jun-08 3:08 
QuestionPositioning toolbar and statusbar Pin
KASR19-Jun-08 20:24
KASR19-Jun-08 20:24 
AnswerRe: Positioning toolbar and statusbar Pin
Hamid_RT9-Jun-08 20:37
Hamid_RT9-Jun-08 20:37 
GeneralRe: Positioning toolbar and statusbar Pin
KASR19-Jun-08 20:40
KASR19-Jun-08 20:40 
GeneralRe: Positioning toolbar and statusbar Pin
Hamid_RT9-Jun-08 21:40
Hamid_RT9-Jun-08 21:40 
GeneralRe: Positioning toolbar and statusbar Pin
KASR19-Jun-08 20:43
KASR19-Jun-08 20:43 
GeneralRe: Positioning toolbar and statusbar Pin
Hamid_RT9-Jun-08 20:45
Hamid_RT9-Jun-08 20:45 
GeneralRe: Positioning toolbar and statusbar Pin
KASR19-Jun-08 20:51
KASR19-Jun-08 20:51 
GeneralRe: Positioning toolbar and statusbar Pin
Hamid_RT9-Jun-08 21:08
Hamid_RT9-Jun-08 21:08 
GeneralRe: Positioning toolbar and statusbar Pin
Cedric Moonen9-Jun-08 21:12
Cedric Moonen9-Jun-08 21:12 
GeneralRe: Positioning toolbar and statusbar Pin
Hamid_RT9-Jun-08 21:18
Hamid_RT9-Jun-08 21:18 
GeneralRe: Positioning toolbar and statusbar Pin
KASR19-Jun-08 21:32
KASR19-Jun-08 21:32 
GeneralRe: Positioning toolbar and statusbar Pin
Cedric Moonen9-Jun-08 21:40
Cedric Moonen9-Jun-08 21:40 

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.