Click here to Skip to main content
16,007,277 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how do i use DeleteObject()... Pin
John Cruz2-Mar-02 21:57
John Cruz2-Mar-02 21:57 
GeneralTexture filter in OpenGL Pin
Mazdak2-Mar-02 19:30
Mazdak2-Mar-02 19:30 
GeneralRe: Texture filter in OpenGL Pin
alex.barylski2-Mar-02 22:55
alex.barylski2-Mar-02 22:55 
GeneralRe: Texture filter in OpenGL Pin
Mazdak2-Mar-02 23:23
Mazdak2-Mar-02 23:23 
GeneralUsing Delimiter EOF :: C++ Pin
valikac2-Mar-02 19:26
valikac2-Mar-02 19:26 
GeneralRe: Using Delimiter EOF :: C++ Pin
Mazdak2-Mar-02 19:29
Mazdak2-Mar-02 19:29 
GeneralATL doubt Pin
Nish Nishant2-Mar-02 18:15
sitebuilderNish Nishant2-Mar-02 18:15 
GeneralRe: ATL doubt Pin
Mazdak2-Mar-02 19:21
Mazdak2-Mar-02 19:21 
Hi Nish:

public:
HRESULT FinalConstruct();
private:
std::vector(CComBSTR) m_vearray;--->I change this line because its like HTML tag,but you know the difference


Then add the implementation of FinalConstruct()
HRESULT CYourClass::FinalConstruct()
{
m_vearray.push_back(CComBSTR(L"Hello"));
return S_OK;
}


then add a property to your component with VARIANT * argument

STDMETHODIMP CYourclass::get_property(VARIANT * pVal)
{
VariantInit(pVal);
pVal->vt=VT_ARRAY|VT_BSTR;
SAFEARRAY *psa;
SAFEARRAYBOUND bounds=(m_vearray.size(),0);
psa=SafeArrayCreate(VT_BSTR,1,&bounds);

BSTR *bstrArray;
SafeArrayAccessData(psa,reiterpret_cast<void **>(&bstrArray));
std::vector(CComBSTR)::iterator it;--->change this line too
int i=0;
for(it=m_vearray.begin();it !=m_vearray.end();i++)
{
  bstrArray[i]=SysAllocString((*it).m_str);
}
SafeArrayUnaccessData(psa);
pVal->parray=psa;
return S_OK;
}


Is that what you want Nish?

Mazy

"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here."
Wish You Were Here-Pink Floyd-1975

GeneralRe: ATL doubt Pin
Nish Nishant2-Mar-02 21:04
sitebuilderNish Nishant2-Mar-02 21:04 
GeneralRe: ATL doubt Pin
Mazdak2-Mar-02 21:28
Mazdak2-Mar-02 21:28 
GeneralRe: ATL doubt Pin
Nish Nishant2-Mar-02 22:30
sitebuilderNish Nishant2-Mar-02 22:30 
GeneralRe: ATL doubt Pin
Christian Graus2-Mar-02 21:41
protectorChristian Graus2-Mar-02 21:41 
GeneralRe: ATL doubt Pin
Nish Nishant2-Mar-02 22:31
sitebuilderNish Nishant2-Mar-02 22:31 
GeneralRe: ATL doubt Pin
Christian Graus2-Mar-02 22:42
protectorChristian Graus2-Mar-02 22:42 
GeneralRe: ATL doubt Pin
Nish Nishant2-Mar-02 23:12
sitebuilderNish Nishant2-Mar-02 23:12 
GeneralRe: ATL doubt Pin
pba_3-Mar-02 2:52
pba_3-Mar-02 2:52 
GeneralRe: ATL doubt Pin
pba_3-Mar-02 3:13
pba_3-Mar-02 3:13 
Questionhow to new a doc in MDI application in programme?? Pin
benben2-Mar-02 17:40
benben2-Mar-02 17:40 
AnswerRe: how to new a doc in MDI application in programme?? Pin
Roger Allen4-Mar-02 1:16
Roger Allen4-Mar-02 1:16 
GeneralHelp writing a game tree for tictactoe Pin
John Cruz2-Mar-02 17:02
John Cruz2-Mar-02 17:02 
GeneralRe: Help writing a game tree for tictactoe Pin
alex.barylski2-Mar-02 18:32
alex.barylski2-Mar-02 18:32 
GeneralRe: Help writing a game tree for tictactoe Pin
John Cruz2-Mar-02 18:50
John Cruz2-Mar-02 18:50 
GeneralRe: Help writing a game tree for tictactoe Pin
alex.barylski2-Mar-02 23:20
alex.barylski2-Mar-02 23:20 
GeneralRe: Help writing a game tree for tictactoe Pin
John Cruz3-Mar-02 0:53
John Cruz3-Mar-02 0:53 
GeneralKeyboard delay time Pin
PJ Arends2-Mar-02 16:29
professionalPJ Arends2-Mar-02 16:29 

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.