Click here to Skip to main content
15,902,635 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Can anyone see memory leak in this code? Pin
Matthew Faithfull16-Sep-08 3:20
Matthew Faithfull16-Sep-08 3:20 
GeneralRe: Can anyone see memory leak in this code? Pin
SRKSHOME16-Sep-08 19:20
SRKSHOME16-Sep-08 19:20 
QuestionDevice name from the devicemanager Pin
hariakuthota15-Sep-08 23:50
hariakuthota15-Sep-08 23:50 
QuestionRe: Device name from the devicemanager [modified] Pin
Roger Stoltz16-Sep-08 0:02
Roger Stoltz16-Sep-08 0:02 
AnswerRe: Device name from the devicemanager Pin
cmk16-Sep-08 9:34
cmk16-Sep-08 9:34 
AnswerRe: Device name from the devicemanager Pin
Roger Stoltz16-Sep-08 20:40
Roger Stoltz16-Sep-08 20:40 
AnswerRe: Device name from the devicemanager Pin
Sarath C16-Sep-08 1:12
Sarath C16-Sep-08 1:12 
QuestionPermanent Handle Map problem Pin
Electronic7515-Sep-08 23:12
Electronic7515-Sep-08 23:12 
Hello, I have a view that has a property sheet and property pages. when I want start a new document an assertion error happens. I followed the call stack and found out that problem occurs at this function
CWnd* PASCAL CWnd::FromHandlePermanent(HWND hWnd)
{
	CHandleMap* pMap = afxMapHWND();
	CWnd* pWnd = NULL;
	if (pMap != NULL)
	{
		// only look in the permanent map - does no allocations
		pWnd = (CWnd*)pMap->LookupPermanent(hWnd);
		ASSERT(pWnd == NULL || pWnd->m_hWnd == hWnd);//<<<< this ASSERT fails
	}
	return pWnd;
}

I took the hWnd and searched it in spy++ windows list and I found out that this window is the property sheet. In spy++ I couldn't find any problem in properties of this window even its childs(property pages) seemed OK. but the problem is when windows look in its permanent handle map it returns an erroneous pointer. the pointer is not null neither the hWnd of the returned pointer but hWnd of returned pointer is 0x30203020 which is different from the FromHandlePermanent(HWND hWnd) supplied sane handle. of course the returned pointer is completely erroneous and this supposed to be a window has no sane owner, child, next window or prev window. How can I find the problem?

thanks
QuestionRe: Permanent Handle Map problem Pin
Mark Salsbery16-Sep-08 7:54
Mark Salsbery16-Sep-08 7:54 
AnswerRe: Permanent Handle Map problem Pin
Electronic7516-Sep-08 17:13
Electronic7516-Sep-08 17:13 
AnswerRe: Permanent Handle Map problem Pin
Electronic7516-Sep-08 19:33
Electronic7516-Sep-08 19:33 
QuestionCListCtrl Color Problem Pin
Dhiraj kumar Saini15-Sep-08 22:50
Dhiraj kumar Saini15-Sep-08 22:50 
AnswerRe: CListCtrl Color Problem Pin
Hamid_RT15-Sep-08 22:55
Hamid_RT15-Sep-08 22:55 
GeneralRe: CListCtrl Color Problem Pin
Dhiraj kumar Saini16-Sep-08 1:29
Dhiraj kumar Saini16-Sep-08 1:29 
GeneralRe: CListCtrl Color Problem Pin
Hamid_RT16-Sep-08 4:34
Hamid_RT16-Sep-08 4:34 
QuestionInternal Compiler Error Pin
subramanyeswari15-Sep-08 22:44
subramanyeswari15-Sep-08 22:44 
AnswerRe: Internal Compiler Error Pin
toxcct15-Sep-08 22:49
toxcct15-Sep-08 22:49 
GeneralRe: Internal Compiler Error Pin
subramanyeswari15-Sep-08 23:59
subramanyeswari15-Sep-08 23:59 
GeneralRe: Internal Compiler Error Pin
toxcct16-Sep-08 0:01
toxcct16-Sep-08 0:01 
AnswerRe: Internal Compiler Error Pin
Rane15-Sep-08 22:57
Rane15-Sep-08 22:57 
AnswerRe: Internal Compiler Error Pin
Rane16-Sep-08 0:21
Rane16-Sep-08 0:21 
Questionfatal error C1083: Cannot open source file: abc.cpp: No such file or directory Pin
ptr_Electron15-Sep-08 22:31
ptr_Electron15-Sep-08 22:31 
AnswerRe: fatal error C1083: Cannot open source file: abc.cpp: No such file or directory Pin
Rane15-Sep-08 22:45
Rane15-Sep-08 22:45 
GeneralRe: fatal error C1083: Cannot open source file: abc.cpp: No such file or directory Pin
ptr_Electron15-Sep-08 22:50
ptr_Electron15-Sep-08 22:50 
AnswerRe: fatal error C1083: Cannot open source file: abc.cpp: No such file or directory Pin
toxcct15-Sep-08 22:45
toxcct15-Sep-08 22:45 

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.