Click here to Skip to main content
15,893,337 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionLAN API Pin
Allad13-Jan-06 11:52
Allad13-Jan-06 11:52 
AnswerRe: LAN API Pin
zubair_ahmed13-Jan-06 19:46
zubair_ahmed13-Jan-06 19:46 
GeneralRe: LAN API Pin
ThatsAlok15-Jan-06 19:12
ThatsAlok15-Jan-06 19:12 
AnswerRe: LAN API Pin
ThatsAlok15-Jan-06 19:10
ThatsAlok15-Jan-06 19:10 
QuestionHow to call CView::OnUpdate Pin
elephantstar13-Jan-06 8:10
elephantstar13-Jan-06 8:10 
AnswerRe: How to call CView::OnUpdate Pin
John M. Drescher13-Jan-06 11:30
John M. Drescher13-Jan-06 11:30 
AnswerRe: How to call CView::OnUpdate Pin
FarPointer13-Jan-06 23:51
FarPointer13-Jan-06 23:51 
QuestionCComboBox GetItemDataPtr ( problem found ) Pin
Maximilien13-Jan-06 5:35
Maximilien13-Jan-06 5:35 
I have a small problem that I cannot find concerning GetItemDataPtr/SetItemDataPtr for the ComboBox.

I do something like this to insert an item :

/// p is a struct that also contains a name
void MyCombo::InsertString( MyPointer* pMyPointer  )
{
  int iIndex = AddString( pMyPointer ->name );
  SetItemDataPtr( iIndex, pMyPointer );

// if I do a GetItemDataPtr here, to test, the pointer is valid.
}


and this to get the data.
/// p is a struct that also contains a name
MyPointer* MyCombo::InsertString( int iIndex )
{
  // index is valid.
  MyPointer* p = ( MyPointer*) GetItemDataPtr( iIndex );
}


at this point, the pointer in the combobox is invalid ( 0x00000001 ) Confused | :confused:

I'm not certain where to start looking for clue to why this happens.

Thanks for info, tips, insights.

Max.

Edit :
Ok, Found the problem, someone else is doing a SetItemData somewhere else, and overwrites the pointer !!!! D'Oh! | :doh:


Maximilien Lincourt
Your Head A Splode - Strong Bad

-- modified at 13:33 Friday 13th January, 2006
QuestionCOleVariant Empty bstrval Pin
TWS_Dave13-Jan-06 5:34
TWS_Dave13-Jan-06 5:34 
AnswerRe: COleVariant Empty bstrval Pin
James R. Twine13-Jan-06 6:58
James R. Twine13-Jan-06 6:58 
AnswerRe: COleVariant Empty bstrval Pin
Stephen Hewitt14-Jan-06 2:22
Stephen Hewitt14-Jan-06 2:22 
AnswerRe: COleVariant Empty bstrval Pin
TWS_Dave14-Jan-06 4:57
TWS_Dave14-Jan-06 4:57 
QuestionShockwave Flash Control Pin
zubair_ahmed13-Jan-06 3:31
zubair_ahmed13-Jan-06 3:31 
AnswerRe: Shockwave Flash Control Pin
Prakash Nadar13-Jan-06 5:30
Prakash Nadar13-Jan-06 5:30 
GeneralRe: Shockwave Flash Control Pin
Maximilien13-Jan-06 6:36
Maximilien13-Jan-06 6:36 
GeneralRe: Shockwave Flash Control Pin
Prakash Nadar13-Jan-06 6:38
Prakash Nadar13-Jan-06 6:38 
AnswerRe: Shockwave Flash Control Pin
zubair_ahmed13-Jan-06 20:32
zubair_ahmed13-Jan-06 20:32 
GeneralRe: Shockwave Flash Control Pin
Stephen Hewitt14-Jan-06 2:26
Stephen Hewitt14-Jan-06 2:26 
QuestionOpening an URL in MFC Pin
Aryan S13-Jan-06 3:04
Aryan S13-Jan-06 3:04 
AnswerRe: Opening an URL in MFC Pin
Maximilien13-Jan-06 3:16
Maximilien13-Jan-06 3:16 
AnswerRe: Opening an URL in MFC Pin
ThatsAlok15-Jan-06 19:08
ThatsAlok15-Jan-06 19:08 
QuestionAround 500 controls in a Dialog Pin
AnsGe13-Jan-06 3:03
AnsGe13-Jan-06 3:03 
AnswerRe: Around 500 controls in a Dialog Pin
toxcct13-Jan-06 3:10
toxcct13-Jan-06 3:10 
AnswerRe: Around 500 controls in a Dialog Pin
Maximilien13-Jan-06 3:13
Maximilien13-Jan-06 3:13 
GeneralRe: Around 500 controls in a Dialog Pin
Rajesh R Subramanian13-Jan-06 18:55
professionalRajesh R Subramanian13-Jan-06 18:55 

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.