Click here to Skip to main content
16,005,141 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralMultiple Document Extensions Pin
Frank Deo30-Aug-01 13:49
Frank Deo30-Aug-01 13:49 
GeneralRe: Multiple Document Extensions Pin
Ben Burnett30-Aug-01 15:04
Ben Burnett30-Aug-01 15:04 
GeneralRe: Multiple Document Extensions Pin
Frank Deo30-Aug-01 15:53
Frank Deo30-Aug-01 15:53 
Questioncreating/changing icons? Pin
30-Aug-01 12:19
suss30-Aug-01 12:19 
AnswerRe: creating/changing icons? Pin
Paolo Messina30-Aug-01 23:57
professionalPaolo Messina30-Aug-01 23:57 
GeneralRe: creating/changing icons? Pin
31-Aug-01 3:10
suss31-Aug-01 3:10 
AnswerRe: creating/changing icons? Pin
Paul A. Howes31-Aug-01 3:35
Paul A. Howes31-Aug-01 3:35 
GeneralMSXML SAX Attributes Question Pin
Michael A. Barnhart30-Aug-01 12:15
Michael A. Barnhart30-Aug-01 12:15 
I am experimenting with the MSXML 3 Sax parser.
When responding to the start element event I want to handle the elements attributes. I am going in circles here. The only code I can make work is to copy the entire string retuned into a CString and then trim it to the proper length. Any attemps to just access the character data only return the first character. I have tried variation of strncpy and memcpy and various casting to no effect. Any suggestions would be greatly apperciated.

HRESULT STDMETHODCALLTYPE CMyContentHandler::startElement(
/* [in] */ unsigned short *pwchNamespaceUri,
/* [in] */ int cchNamespaceUri,
/* [in] */ unsigned short *pwchLocalName,
/* [in] */ int cchLocalName,
/* [in] */ unsigned short *pwchRawName,
/* [in] */ int cchRawName,
/* [in] */ MSXML2::ISAXAttributes __RPC_FAR *pAttributes)
{
_bstr_t bstrString(pwchRawName);
CXML *child = new CXML;
CString Name,Value;
Name = pwchRawName;
child->SetTagName(Name);
CComBSTR bstrName;
int max,i,lenUri,lenLocal,lenName,lenValue,j;
const wchar_t *strUri,*strLocal,*strName,*strValue;
HRESULT hr;
hr = pAttributes->getLength(&max);
for (i=0;i<max;i++)
{
="" hr="pAttributes-">getName(i,(unsigned short **)&strUri,&lenUri,(unsigned short **)&strLocal,&lenLocal,(unsigned short **)&strName,&lenName);
hr = pAttributes->getValue(i,(unsigned short **)&strValue,&lenValue);
Name = strName;
Name = Name.Left(lenName);
Value = strValue;
child->SetAttr(Name,Value);
}
if(m_pRoot==NULL)
{
m_pRoot=child;
}
else
{
m_pCurrent->AddChild(child);
}
m_pCurrent=child;

return S_OK;
}
GeneralRe: MSXML SAX Attributes Question Pin
Alwin7530-Aug-01 20:53
Alwin7530-Aug-01 20:53 
GeneralRe: MSXML SAX Attributes Question Pin
Michael A. Barnhart31-Aug-01 0:29
Michael A. Barnhart31-Aug-01 0:29 
GeneralVisual Studio directories Pin
Michael P Butler30-Aug-01 11:09
Michael P Butler30-Aug-01 11:09 
GeneralRe: Visual Studio directories Pin
Tomasz Sowinski30-Aug-01 11:20
Tomasz Sowinski30-Aug-01 11:20 
GeneralAPI call Required Pin
30-Aug-01 10:41
suss30-Aug-01 10:41 
GeneralProgramatically updating windows 'appearance' color settings, such as desktop and title bar Pin
Jase Jennings30-Aug-01 10:29
Jase Jennings30-Aug-01 10:29 
GeneralRe: Programatically updating windows 'appearance' color settings, such as desktop and title bar Pin
Tomasz Sowinski30-Aug-01 10:33
Tomasz Sowinski30-Aug-01 10:33 
GeneralRe: Programatically updating windows 'appearance' color settings, such as desktop and title bar Pin
Jase Jennings30-Aug-01 10:58
Jase Jennings30-Aug-01 10:58 
Questionwhat's alpha and intel platform ? Pin
30-Aug-01 10:23
suss30-Aug-01 10:23 
AnswerRe: what's alpha and intel platform ? Pin
Tomasz Sowinski30-Aug-01 10:37
Tomasz Sowinski30-Aug-01 10:37 
GeneralRe: what's alpha and intel platform ? Pin
30-Aug-01 11:05
suss30-Aug-01 11:05 
GeneralWindow in a DLL Pin
Jamie Nordmeyer30-Aug-01 10:18
Jamie Nordmeyer30-Aug-01 10:18 
GeneralRe: Window in a DLL Pin
Tomasz Sowinski30-Aug-01 10:31
Tomasz Sowinski30-Aug-01 10:31 
Generalmemset Pin
30-Aug-01 9:22
suss30-Aug-01 9:22 
GeneralRe: memset Pin
Ravi Bhavnani30-Aug-01 9:30
professionalRavi Bhavnani30-Aug-01 9:30 
Questionftp & smb support...what should I use? Pin
Amit Dey30-Aug-01 8:44
Amit Dey30-Aug-01 8:44 
QuestionHow to show vertical scroll bar always in a CRichEditView Pin
Shrini30-Aug-01 8:35
Shrini30-Aug-01 8:35 

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.