Click here to Skip to main content
15,921,179 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionping .. Pin
thangvel4-Aug-09 16:02
thangvel4-Aug-09 16:02 
AnswerRe: ping .. Pin
«_Superman_»4-Aug-09 18:31
professional«_Superman_»4-Aug-09 18:31 
QuestionRe: ping .. Pin
David Crow5-Aug-09 3:05
David Crow5-Aug-09 3:05 
AnswerRe: ping .. Pin
KarstenK5-Aug-09 3:41
mveKarstenK5-Aug-09 3:41 
QuestionAuto build increment with C++? Pin
jeffb424-Aug-09 10:22
jeffb424-Aug-09 10:22 
AnswerRe: Auto build increment with C++? Pin
Code-o-mat4-Aug-09 10:51
Code-o-mat4-Aug-09 10:51 
AnswerRe: Auto build increment with C++? Pin
jeffb424-Aug-09 12:05
jeffb424-Aug-09 12:05 
AnswerRe: Auto build increment with C++? Pin
Randor 4-Aug-09 10:58
professional Randor 4-Aug-09 10:58 
AnswerRe: Auto build increment with C++? Pin
jeffb424-Aug-09 12:03
jeffb424-Aug-09 12:03 
GeneralRe: Auto build increment with C++? Pin
Randor 4-Aug-09 12:43
professional Randor 4-Aug-09 12:43 
AnswerRe: Auto build increment with C++? Pin
David Crow5-Aug-09 3:08
David Crow5-Aug-09 3:08 
QuestionDetecting the state of the Caps Lock key Pin
forrestcupp4-Aug-09 8:15
forrestcupp4-Aug-09 8:15 
AnswerRe: Detecting the state of the Caps Lock key Pin
Randor 4-Aug-09 9:27
professional Randor 4-Aug-09 9:27 
GeneralRe: Detecting the state of the Caps Lock key Pin
forrestcupp4-Aug-09 9:48
forrestcupp4-Aug-09 9:48 
AnswerRe: Detecting the state of the Caps Lock key Pin
David Crow4-Aug-09 10:09
David Crow4-Aug-09 10:09 
Questionhow to convert comma delimited string to unsigned char[] Pin
only_jack4-Aug-09 8:02
only_jack4-Aug-09 8:02 
AnswerRe: how to convert comma delimited string to unsigned char[] Pin
Cedric Moonen4-Aug-09 8:08
Cedric Moonen4-Aug-09 8:08 
AnswerRe: how to convert comma delimited string to unsigned char[] Pin
CPallini4-Aug-09 11:34
mveCPallini4-Aug-09 11:34 
QuestionCodepage 936 Pin
gothic_coder4-Aug-09 7:28
gothic_coder4-Aug-09 7:28 
QuestionRe: Codepage 936 Pin
David Crow4-Aug-09 10:12
David Crow4-Aug-09 10:12 
QuestionProblem with CComboBox::GetItemDataPtr Pin
Nitheesh George4-Aug-09 5:02
Nitheesh George4-Aug-09 5:02 
Hi,

I am getting a problem with the CComboBox::GetItemDataPtr function

i have the following code

TCHAR *szFilePath = new TCHAR[MAX_PATH + 1];
ZeroMemory(szFilePath ,MAX_PATH);
_tcscpy(szFilePath ,_T("C:\Documents and Settings\user\Desktop\Scrollbar.xml"));

int nIndex = m_Combo.AddString(_T("ScrollBar"));
m_Combo.SetItemDataPtr(n , szFilePath);

using the Above code am setting the ItemDataPtr to a Buffer.



On the Selection change event of ComboBox

i have the following code


void CRegDlg::OnCbnSelchangeCombo()
{
// TODO: Add your control notification handler code here
int nIndex = m_Combo.GetCurSel();
void *szFilePath = m_Combo.GetItemDataPtr(n);
}

but the GetItemDataPtr() in OnCbnSelchangeCombo always returns a Bad
pointer. I don't know what is the actual problem with my code. Is there anything i want to do to get the actual buffer from void*.


thanks

Nitheesh

Jose Jo Martin

http://www.simpletools.co.in

QuestionRe: Problem with CComboBox::GetItemDataPtr Pin
David Crow4-Aug-09 5:33
David Crow4-Aug-09 5:33 
AnswerRe: Problem with CComboBox::GetItemDataPtr Pin
Nitheesh George4-Aug-09 5:48
Nitheesh George4-Aug-09 5:48 
Question[Message Deleted] Pin
neha_rai4-Aug-09 4:56
neha_rai4-Aug-09 4:56 
AnswerRe: Simplification of code Pin
David Crow4-Aug-09 5:37
David Crow4-Aug-09 5:37 

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.