Click here to Skip to main content
15,888,454 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
GeneralRe: Problem in - typeid - in Release version Pin
Stephen Hewitt17-Apr-06 19:33
Stephen Hewitt17-Apr-06 19:33 
GeneralRe: Problem in - typeid - in Release version Pin
Sarvan AL17-Apr-06 20:12
Sarvan AL17-Apr-06 20:12 
AnswerRe: Problem in - typeid - in Release version Pin
David Crow18-Apr-06 3:02
David Crow18-Apr-06 3:02 
QuestionCHotKeyCtrl and "space" Pin
Abin17-Apr-06 17:50
Abin17-Apr-06 17:50 
AnswerRe: CHotKeyCtrl and "space" Pin
Branislav17-Apr-06 23:04
Branislav17-Apr-06 23:04 
QuestionHow to add drag/drop to the CTreeCtrl. Pin
megzhou17-Apr-06 17:45
megzhou17-Apr-06 17:45 
AnswerRe: How to add drag/drop to the CTreeCtrl. Pin
Hamid_RT17-Apr-06 19:46
Hamid_RT17-Apr-06 19:46 
QuestionHow to integrate the Simulink in the VC environment? Pin
megzhou17-Apr-06 17:26
megzhou17-Apr-06 17:26 
AnswerRe: How to integrate the Simulink in the VC environment? Pin
megzhou18-Apr-06 15:19
megzhou18-Apr-06 15:19 
QuestionHow to achieve this?? About zoomin/zoomout in CEditView or CEdit... Pin
figer17-Apr-06 16:25
figer17-Apr-06 16:25 
AnswerRe: How to achieve this?? About zoomin/zoomout in CEditView or CEdit... Pin
bob1697217-Apr-06 17:14
bob1697217-Apr-06 17:14 
AnswerRe: How to achieve this?? About zoomin/zoomout in CEditView or CEdit... Pin
bob1697217-Apr-06 17:34
bob1697217-Apr-06 17:34 
GeneralRe: How to achieve this?? About zoomin/zoomout in CEditView or CEdit... Pin
figer18-Apr-06 15:36
figer18-Apr-06 15:36 
GeneralRe: How to achieve this?? About zoomin/zoomout in CEditView or CEdit... Pin
figer18-Apr-06 18:38
figer18-Apr-06 18:38 
GeneralRe: How to achieve this?? About zoomin/zoomout in CEditView or CEdit... Pin
bob1697219-Apr-06 17:14
bob1697219-Apr-06 17:14 

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.