Click here to Skip to main content
15,915,164 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalthank you. That works Pin
ns3-Oct-02 3:55
ns3-Oct-02 3:55 
GeneralRe: thank you. That works Pin
Ravi Bhavnani3-Oct-02 5:39
professionalRavi Bhavnani3-Oct-02 5:39 
GeneralRe: thank you. That works Pin
ns3-Oct-02 5:50
ns3-Oct-02 5:50 
GeneralRe: thank you. That works Pin
Ravi Bhavnani3-Oct-02 5:57
professionalRavi Bhavnani3-Oct-02 5:57 
GeneralRe: thank you. That works Pin
ns3-Oct-02 6:11
ns3-Oct-02 6:11 
GeneralSMTP Transport Event Sink - Email Forking Pin
Member 117930333-Oct-02 3:15
Member 117930333-Oct-02 3:15 
GeneralRe: SMTP Transport Event Sink - Email Forking Pin
Mike Nordell3-Oct-02 7:28
Mike Nordell3-Oct-02 7:28 
QuestionHow to pass in an LPTSTR to SetItemText of listctrl Pin
ns3-Oct-02 3:02
ns3-Oct-02 3:02 
I have:
( Iforgot how to format the less than sign for CP...)
  CString * p;

  p = new CString [iArraySize];


 for (int i=0;i less than iArraySize;i++)
{
   p [i] = pArray[i];

}


  int nIndex = InsertItem(LVIF_TEXT|LVIF_STATE, nPos, p[0],0,LVIS_SELECTED,0,0);
  ASSERT(nIndex != -1);
  if (nIndex < 0) return(nIndex);
  for ( i = 1; i (less than) iArraySize; i++) {

          SetItemText(nIndex, i, p[i]);   ///crashes here.
      }


From MSDN,
BOOL SetItemText( int nItem, int nSubItem, LPTSTR lpszText );


So I think its my third argument thats a problem. How do I fix it so that the two are reconciled?
Thank you and

Appreciate your help,
ns
AnswerRe: How to pass in an LPTSTR to SetItemText of listctrl Pin
Stephane Rodriguez.3-Oct-02 3:17
Stephane Rodriguez.3-Oct-02 3:17 
AnswerRe: How to pass in an LPTSTR to SetItemText of listctrl Pin
ns3-Oct-02 3:35
ns3-Oct-02 3:35 
AnswerRe: How to pass in an LPTSTR to SetItemText of listctrl Pin
Tomasz Sowinski3-Oct-02 4:41
Tomasz Sowinski3-Oct-02 4:41 
GeneralRe: How to pass in an LPTSTR to SetItemText of listctrl Pin
ns3-Oct-02 4:54
ns3-Oct-02 4:54 
GeneralWindows Hooks/Spyware Pin
Mauricio Ritter3-Oct-02 1:39
Mauricio Ritter3-Oct-02 1:39 
GeneralRe: Windows Hooks/Spyware Pin
Daniel Turini3-Oct-02 2:13
Daniel Turini3-Oct-02 2:13 
GeneralRe: Windows Hooks/Spyware Pin
Stephane Rodriguez.3-Oct-02 2:13
Stephane Rodriguez.3-Oct-02 2:13 
GeneralSpy messages Pin
zego003-Oct-02 1:42
zego003-Oct-02 1:42 
GeneralRe: Spy messages Pin
jmkhael3-Oct-02 2:57
jmkhael3-Oct-02 2:57 
Generalfindfirst Pin
jerry0davis3-Oct-02 1:29
jerry0davis3-Oct-02 1:29 
GeneralRe: findfirst Pin
Mike Nordell3-Oct-02 2:16
Mike Nordell3-Oct-02 2:16 
GeneralRe: findfirst Pin
jerry0davis3-Oct-02 3:23
jerry0davis3-Oct-02 3:23 
GeneralDialog Box after Dialog Box Pin
Chun Te, Ewe3-Oct-02 1:07
Chun Te, Ewe3-Oct-02 1:07 
GeneralRe: Dialog Box after Dialog Box Pin
benjymous3-Oct-02 1:26
benjymous3-Oct-02 1:26 
GeneralRe: Dialog Box after Dialog Box Pin
Mariusz Popiolek3-Oct-02 1:28
sussMariusz Popiolek3-Oct-02 1:28 
GeneralRe: Dialog Box after Dialog Box Pin
Debs3-Oct-02 2:15
Debs3-Oct-02 2:15 
GeneralRe: Dialog Box after Dialog Box Pin
Debs3-Oct-02 2:33
Debs3-Oct-02 2:33 

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.