Re: how to update my changed picture in my buddy - WeOnlyDo Discussion board

Re: how to update my changed picture in my buddy (General questions)

by sapna, Tuesday, July 07, 2009, 16:34 (5617 days ago) @ wodDamir

[code]
IXMPPVCard mycard ;
mycard.AttachDispatch(m_XMPP.GetVCard(), TRUE) ;
CString nickName = mycard.GetNickName() ;
//this is returning NULL
CPictureHolder *myPicture = new CPictureHolder;
HBITMAP hBMP ;
IDispatch * pTempDispatch = mycard.GetPhoto() ;
// this is returning NULL too
if(pTempDispatch != NULL)
{
myPicture->SetPictureDispatch((LPPICTUREDISP)mycard.GetPhoto());
myPicture->m_pPict->get_Handle((OLE_HANDLE FAR *)&hBMP) ;
m_pIMDialog->SetImage(hBMP) ;
}
else
{
m_pIMDialog->SetImage( userpic.bmp ) ;
}

mycard.DetachDispatch() ;
[/code]
the NULL is being returned for my own vcard when i already have a picture. if i have a picture then in contact details of xmpp_vcarddetails i will receive my own vcard. which means that i will receive my own contact card if i say mycard.receive()


Complete thread: