Click here to Skip to main content
16,007,885 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how to build a multilingual application? Pin
Rene De La Garza26-Sep-02 10:10
Rene De La Garza26-Sep-02 10:10 
AnswerRe: how to build a multilingual application? Pin
Roman Fadeyev26-Sep-02 3:21
Roman Fadeyev26-Sep-02 3:21 
GeneralRe: how to build a multilingual application? Pin
Rene De La Garza26-Sep-02 10:11
Rene De La Garza26-Sep-02 10:11 
GeneralRe: how to build a multilingual application? Pin
Roman Fadeyev26-Sep-02 19:38
Roman Fadeyev26-Sep-02 19:38 
GeneralTrouble with Serial programming in NT Pin
generic_user_id26-Sep-02 2:50
generic_user_id26-Sep-02 2:50 
GeneralRe: Trouble with Serial programming in NT Pin
Lakitu26-Sep-02 3:41
Lakitu26-Sep-02 3:41 
GeneralRe: Trouble with Serial programming in NT Pin
generic_user_id26-Sep-02 5:24
generic_user_id26-Sep-02 5:24 
GeneralTrouble with CListView Pin
Anonymous26-Sep-02 2:44
Anonymous26-Sep-02 2:44 
I having trouble get any items to show in my CListView, I first tried this, from examples I found:
<br />
LV_ITEM lvi;<br />
lvi.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_PARAM; <br />
lvi.iItem = index; <br />
lvi.iSubItem = 0; <br />
lvi.iImage = 0;<br />
lvi.pszText = LPSTR_TEXTCALLBACK; <br />
lvi.lParam = (LPARAM) pItem;<br />
<br />
if (GetListCtrl().InsertItem(&lvi) == -1)<br />
	return FALSE;<br />


where pItem is a struct holding info about each item, e.g. all the text for each column(i'm using report view).and I message maped ON_NOTIFY_REFLECT(LVN_GETDISPINFO, OnGetDispInfo) and had this code to set all the column text:
<br />
void CTest::OnGetDispInfo(NMHDR* pNMHDR, LRESULT* pResult) <br />
{<br />
	LV_DISPINFO* pDispInfo = (LV_DISPINFO*) pNMHDR;<br />
    if (pDispInfo->item.mask & LVIF_TEXT) {<br />
        ITEMINFO* pItem = (ITEMINFO*) pDispInfo->item.lParam;<br />
        switch (pDispInfo->item.iSubItem) {<br />
        case 0: // Date<br />
            ::lstrcpy(pDispInfo->item.pszText, pItem->date);<br />
            break;<br />
        case 1: // Title<br />
 	::lstrcpy(pDispInfo->item.pszText, pItem->name);<br />
            break;<br />
	case 2: // Size<br />
		::lstrcpy(pDispInfo->item.pszText, pItem->size);<br />
            break;<br />
        }<br />
    }<br />
  *pResult = 0;<br />
}<br />

Which was pretty much from an example as well, which should set thetext for each column, my problem is nothing shows up the scrollbar apears so items are getting added but no text shows. I then tried just using GetListCtrl().InsertItem(index, "") and then use GetListCtrl().SetItemText(index, subIndex, "sometext") to set each coloumn but still the scrollbar showed but no text.

Has anyone had this problem, or can give me any help, maybe i'm doing something obviously wrong, thanks for any help.

oh sorry about the loss of format.

luke. - hope that all made sense Smile | :)
hmm it said i didnt fill out some fields, but they all are... hope it works this time
GeneralRe: Trouble with CListView Pin
KaЯl26-Sep-02 3:17
KaЯl26-Sep-02 3:17 
Generalcreating a C Exception derived class Pin
ns26-Sep-02 2:40
ns26-Sep-02 2:40 
GeneralRe: creating a C Exception derived class Pin
Tomasz Sowinski26-Sep-02 2:44
Tomasz Sowinski26-Sep-02 2:44 
GeneralRe: creating a C Exception derived class Pin
ns26-Sep-02 2:50
ns26-Sep-02 2:50 
GeneralRe: creating a C Exception derived class Pin
Tomasz Sowinski26-Sep-02 2:53
Tomasz Sowinski26-Sep-02 2:53 
GeneralRe: creating a C Exception derived class Pin
ns26-Sep-02 2:57
ns26-Sep-02 2:57 
GeneralRe: creating a C Exception derived class Pin
Tomasz Sowinski26-Sep-02 3:01
Tomasz Sowinski26-Sep-02 3:01 
GeneralRe: creating a C Exception derived class Pin
jmkhael26-Sep-02 2:41
jmkhael26-Sep-02 2:41 
GeneralRe: creating a C Exception derived class Pin
Ravi Bhavnani26-Sep-02 3:18
professionalRavi Bhavnani26-Sep-02 3:18 
GeneralHelp MDI!!!!!!!!!!!!! Pin
Sunnygirl26-Sep-02 2:35
Sunnygirl26-Sep-02 2:35 
GeneralRe: Help MDI!!!!!!!!!!!!! Pin
KaЯl26-Sep-02 2:46
KaЯl26-Sep-02 2:46 
GeneralRe: Help MDI!!!!!!!!!!!!! Pin
Stephane Rodriguez.26-Sep-02 2:58
Stephane Rodriguez.26-Sep-02 2:58 
GeneralRe: Help MDI!!!!!!!!!!!!! Pin
jmkhael26-Sep-02 2:43
jmkhael26-Sep-02 2:43 
GeneralRe: Help MDI!!!!!!!!!!!!! Pin
Tomasz Sowinski26-Sep-02 2:49
Tomasz Sowinski26-Sep-02 2:49 
GeneralVC++ 7 compiler issue Pin
Shamoon26-Sep-02 2:12
Shamoon26-Sep-02 2:12 
GeneralRe: VC++ 7 compiler issue Pin
Sas280826-Sep-02 2:57
sussSas280826-Sep-02 2:57 
GeneralRe: VC++ 7 compiler issue Pin
SteveKing26-Sep-02 4:10
SteveKing26-Sep-02 4:10 

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.