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

C / C++ / MFC

 
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 
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 
Hello Mark, No it is in the same thread. I followed the stack more closely and with the help of a lot of breaking points and many hours I found out problem occurs in an XML class that tries to read an XML file. I have a MFC application and I used a MSXML wrapper class from this address http://www.codeguru.com/cpp/data/data-misc/xml/article.php/c8287/[^] (I don't know credit of this work goes to whom I later found out some people developed very similar codes earlier).
Now I already had defined a pointer to my CPropertySheet in my CDocument class

m_pDefineSheet = new CDefineSheet;

and when I open a new document a new view is created and the property sheet will be created as its child

CFormView::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext);
	

pDoc = (CMyoc*) GetDocument();
	if(!pDoc)
		return 0;
	
	pDoc->m_pDefineSheet->AddPage(pDoc->m_pDev1);
	pDoc->m_pDefineSheet->AddPage(pDoc->m_pDev2);
	pDoc->m_pDefineSheet->AddPage(pDoc->m_pDev3);	
	

	if (!pDoc->m_pDefineSheet->Create(this,
			DS_CONTEXTHELP | DS_SETFONT | WS_CHILD | WS_VISIBLE))
	{
		DestroyWindow();
		return FALSE;
	}      

No problem thus far then CMyDoc::OnNewDocument()will be executed and there it loads an XML document using CXMLManager m_xmlManager

    m_xmlManager.Initlize();
m_xmlManager.Load(sData);
m_xmlManager.GetRoot()->get_childNodes(&pList1);
n1 = m_xmlManager.GetNoOfChilds(pList1) ;
for(i1=0;i1<n1;i1++)>
{
    pNode1 = m_xmlManager.GetItemNode(i1,pList1);
    pList2 = m_xmlManager.GetChildList(pNode1);
    n2 = m_xmlManager.GetNoOfChilds(pList2) ;
    sName1 = m_xmlManager.GetNodeName(pNode1);
    sData = m_xmlManager.GetText(pNode1);
     }

Upon execution of this code it seems that something overwrites the m_pDefineSheet location and when I execute
AfxGetMainWnd()->FromHandle((HWND)x)
in immediate window
x is the handle of m_pDefinesheet which was ok prior to execution of this code
it returns error
note that I receive no error of memory access violation that someone illegally has tried to write in memory
This is first time I have encountered such problem!
Thank you anyway.
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 
AnswerRe: fatal error C1083: Cannot open source file: abc.cpp: No such file or directory Pin
Hamid_RT15-Sep-08 22:50
Hamid_RT15-Sep-08 22:50 
GeneralRe: fatal error C1083: Cannot open source file: abc.cpp: No such file or directory Pin
ptr_Electron16-Sep-08 0:27
ptr_Electron16-Sep-08 0:27 

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.