Go4Expert (http://www.go4expert.com/)
-   MFC (http://www.go4expert.com/forums/mfc/)
-   -   convserion problem (http://www.go4expert.com/forums/convserion-problem-t20483/)

answerme 23Dec2009 15:50

convserion problem
Hi All
I am getting a error

strLstItem.Format("%f", latitude);
//objLstCtrl.SetItemText(nItem, 2, strLstItem);
 objLstCtrl.SetItemText(nItem, 2, latitude);

error C2664: 'CListCtrl::SetItemText' : cannot convert parameter 3 from 'double' to 'LPCTSTR'

Can anyone solve

Gene Poole 25Dec2009 03:08

Re: convserion problem
I'm assuming "latiutude" is type float, "strLstItem" is a CString, "objLstCtrl" is a CListCtrl, and UNICODE is off. Given that, you should be calling SetItemText as in your commented out piece. Why is it commented out?

All times are GMT +5.5. The time now is 00:10.