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

C / C++ / MFC

 
GeneralRe: Base class constructor Pin
Daniel Turini23-Oct-02 21:58
Daniel Turini23-Oct-02 21:58 
GeneralRe: Base class constructor Pin
Mazdak23-Oct-02 22:28
Mazdak23-Oct-02 22:28 
QuestionRequest LAN-ID? Pin
Andreas_DE23-Oct-02 21:30
Andreas_DE23-Oct-02 21:30 
AnswerRe: Request LAN-ID? Pin
Simon.W24-Oct-02 1:25
Simon.W24-Oct-02 1:25 
GeneralCListCtrl, setitem problem... Pin
Ahmet Orkun GEDiK23-Oct-02 20:58
sussAhmet Orkun GEDiK23-Oct-02 20:58 
GeneralRe: CListCtrl, setitem problem... Pin
Christian Graus23-Oct-02 21:42
protectorChristian Graus23-Oct-02 21:42 
GeneralRe: CListCtrl, setitem problem... Pin
Ahmet Orkun GEDiK23-Oct-02 21:52
sussAhmet Orkun GEDiK23-Oct-02 21:52 
GeneralRe: CListCtrl, setitem problem... Pin
Ahmet Orkun GEDiK24-Oct-02 2:55
sussAhmet Orkun GEDiK24-Oct-02 2:55 
I've changed my code to C++ and life is good now.

INT iHexIdx=0; // Hex convertion loop index
LONG lRowIdx=0; // Row index pointer
LONG lRowLongValue=0; // Converted row value
CString rTemp; // Temporary value
CString rString; // Listbox selected item text

// Loop until end of list
while(m_cPeriodList.GetCount()!=lRowIdx)
{
// Get text from listbox
m_cPeriodList.GetText(lRowIdx, rString);

// Convert CString listbox value to LONG
lRowLongValue = _wtoi(rString.GetBuffer(rString.GetLength()));

// Convert byte to hex
for(iHexIdx=1; iHexIdx>=0; iHexIdx--)
rTemp.Insert((rTemp.GetLength()+(1-iHexIdx)),("0123456789ABCDEF"[((lRowLongValue >> iHexIdx*4) & 0xF)]));

// Increase row index
lRowIdx++;
}
// Fill empty bytes with 0
for(iHexIdx=rTemp.GetLength(); iHexIdx<=40; iHexIdx++)
rTemp.Insert(iHexIdx, _T("0"));

// Set comment
lvi->mask = LVIF_TEXT;
lvi->iSubItem = 3;
lvi->iItem = 0;
lvi->pszText = (LPTSTR)(LPCTSTR)rTemp;
m_list->SetItem(lvi);
GeneralModeless Pin
udayGovekar23-Oct-02 20:54
udayGovekar23-Oct-02 20:54 
GeneralRe: Modeless Pin
Paul M Watt23-Oct-02 21:19
mentorPaul M Watt23-Oct-02 21:19 
QuestionBSTR --> CString ? Pin
Daniel Strigl23-Oct-02 20:16
Daniel Strigl23-Oct-02 20:16 
AnswerRe: BSTR --> CString ? Pin
klphua23-Oct-02 21:13
klphua23-Oct-02 21:13 
GeneralRe: BSTR --> CString ? Pin
Christian Graus23-Oct-02 21:22
protectorChristian Graus23-Oct-02 21:22 
GeneralRe: BSTR --> CString ? Pin
Daniel Turini23-Oct-02 21:32
Daniel Turini23-Oct-02 21:32 
AnswerRe: BSTR --> CString ? Pin
Christian Graus23-Oct-02 21:23
protectorChristian Graus23-Oct-02 21:23 
GeneralRe: BSTR --> CString ? Pin
klphua23-Oct-02 21:27
klphua23-Oct-02 21:27 
GeneralRe: BSTR --> CString ? Pin
Christian Graus23-Oct-02 21:39
protectorChristian Graus23-Oct-02 21:39 
GeneralRe: BSTR --> CString ? Pin
Daniel Strigl23-Oct-02 21:28
Daniel Strigl23-Oct-02 21:28 
AnswerRe: BSTR --> CString ? Pin
Yaron Nir24-Oct-02 2:04
Yaron Nir24-Oct-02 2:04 
GeneralRe: BSTR --> CString ? Pin
dabs24-Oct-02 3:28
dabs24-Oct-02 3:28 
GeneralRe: BSTR --> CString ? Pin
Le centriste24-Oct-02 3:34
Le centriste24-Oct-02 3:34 
GeneralRe: BSTR --> CString ? Pin
dabs24-Oct-02 4:39
dabs24-Oct-02 4:39 
GeneralRe: BSTR --> CString ? Pin
JT Anderson24-Oct-02 6:13
JT Anderson24-Oct-02 6:13 
AnswerRe: BSTR --> CString ? Pin
Alvaro Mendez24-Oct-02 8:52
Alvaro Mendez24-Oct-02 8:52 
QuestionHow to detect if a pidl or path a shortcut? Pin
Hiusing23-Oct-02 20:03
Hiusing23-Oct-02 20:03 

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.