Click here to Skip to main content
15,910,603 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: external program Pin
David Crow20-Apr-06 5:13
David Crow20-Apr-06 5:13 
Questionclient app -- web app communication? Pin
Peter Weyzen17-Apr-06 21:24
Peter Weyzen17-Apr-06 21:24 
AnswerRe: client app -- web app communication? Pin
ThatsAlok18-Apr-06 7:42
ThatsAlok18-Apr-06 7:42 
GeneralRe: client app -- web app communication? Pin
Peter Weyzen18-Apr-06 8:36
Peter Weyzen18-Apr-06 8:36 
GeneralRe: client app -- web app communication? Pin
ThatsAlok18-Apr-06 18:23
ThatsAlok18-Apr-06 18:23 
GeneralRe: client app -- web app communication? Pin
Peter Weyzen18-Apr-06 19:26
Peter Weyzen18-Apr-06 19:26 
Questiona problem on threads Pin
keerthikaaa17-Apr-06 21:15
keerthikaaa17-Apr-06 21:15 
AnswerRe: a problem on threads Pin
Parthiban17-Apr-06 21:23
Parthiban17-Apr-06 21:23 
GeneralRe: a problem on threads Pin
keerthikaaa17-Apr-06 21:29
keerthikaaa17-Apr-06 21:29 
GeneralRe: a problem on threads Pin
Stephen Hewitt17-Apr-06 21:35
Stephen Hewitt17-Apr-06 21:35 
AnswerRe: a problem on threads Pin
Stephen Hewitt17-Apr-06 21:25
Stephen Hewitt17-Apr-06 21:25 
GeneralRe: a problem on threads Pin
keerthikaaa17-Apr-06 21:34
keerthikaaa17-Apr-06 21:34 
GeneralRe: a problem on threads Pin
Parthiban17-Apr-06 21:41
Parthiban17-Apr-06 21:41 
GeneralRe: a problem on threads Pin
Stephen Hewitt17-Apr-06 21:44
Stephen Hewitt17-Apr-06 21:44 
QuestionHow to repaint all child windows from CMainFrame? Pin
Sarvan AL17-Apr-06 21:09
Sarvan AL17-Apr-06 21:09 
AnswerRe: How to repaint all child windows from CMainFrame? Pin
Parthiban17-Apr-06 21:15
Parthiban17-Apr-06 21:15 
GeneralRe: How to repaint all child windows from CMainFrame? Pin
Sarvan AL17-Apr-06 21:32
Sarvan AL17-Apr-06 21:32 
QuestionCreate Mutiple Insatnces of same control Pin
RockyJames17-Apr-06 20:27
RockyJames17-Apr-06 20:27 
AnswerRe: Create Mutiple Insatnces of same control Pin
Cedric Moonen17-Apr-06 20:57
Cedric Moonen17-Apr-06 20:57 
AnswerRe: Create Mutiple Insatnces of same control Pin
Parthiban17-Apr-06 21:10
Parthiban17-Apr-06 21:10 
QuestionParallel port and MFC application integration Pin
christinalimsw17-Apr-06 20:12
christinalimsw17-Apr-06 20:12 
AnswerRe: Parallel port and MFC application integration Pin
Branislav17-Apr-06 22:18
Branislav17-Apr-06 22:18 
QuestionProblem in - typeid - in Release version Pin
Sarvan AL17-Apr-06 18:48
Sarvan AL17-Apr-06 18:48 
Hi all,

The code below, works fine in debug version, but gives warning in "Release/Use MFC in Static Library/Code Generation/Multithreaded" configuration.

This is the warning message:
warning C4541: 'typeid' used on polymorphic type 'class CView' with /GR-; unpredictable behavior may result

void CMainFrame::OnUpdateFileClose(CCmdUI* pCmdUI) <br />
{<br />
	BOOL bCanBeClosed = TRUE ;<br />
<br />
	if(IsAnyChildWindowOpen())<br />
	{<br />
		CMDIChildWnd *pChildWnd = MDIGetActive() ;<br />
		CView *pView = pChildWnd->GetActiveView() ;<br />
<br />
		if(typeid(*pView) == typeid(CMyView1) ||<br />
			typeid(*pView) == typeid(CMyView2)||<br />
			typeid(*pView) == typeid(CMyView3)		)<br />
			bCanBeClosed = FALSE ;<br />
	}<br />
	pCmdUI->Enable(IsAnyChildWindowOpen() && <br />
					bCanBeClosed) ;<br />
}


Kindly suggest me a solution. I am using VC6.0/Win2000.

Thanks in advance,
Sarvan AL


-- modified at 1:01 Tuesday 18th April, 2006
AnswerRe: Problem in - typeid - in Release version Pin
Stephen Hewitt17-Apr-06 19:24
Stephen Hewitt17-Apr-06 19:24 
AnswerRe: Problem in - typeid - in Release version Pin
Maxwell Chen17-Apr-06 19:25
Maxwell Chen17-Apr-06 19:25 

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.