//Update static text with new value BSTR tmpBStr; m_pObject1->get_ObjectString(&tmpBStr); _bstr_t tmpbstr(tmpBStr, FALSE); //necessary to avoid a memory leak SetDlgItemText(IDC_CURPROPVAL, tmpbstr); |
//Update static text with new value BSTR tmpBStr; m_pObject1->get_ObjectString(&tmpBStr); _bstr_t tmpbstr; tmpbstr= tmpBStr; //Caution: Memory leak occurs SetDlgItemText(IDC_CURPROPVAL, tmpbstr); |