Click here to Skip to main content
15,895,011 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: wintrust.h Pin
David Crow8-Sep-05 2:59
David Crow8-Sep-05 2:59 
GeneralRe: wintrust.h Pin
sunit57-Sep-05 23:19
sunit57-Sep-05 23:19 
GeneralRe: wintrust.h Pin
nguyenvhn7-Sep-05 23:03
nguyenvhn7-Sep-05 23:03 
General[Message Deleted] Pin
ThatsAlok8-Sep-05 2:35
ThatsAlok8-Sep-05 2:35 
GeneralRe: wintrust.h Pin
sunit58-Sep-05 2:52
sunit58-Sep-05 2:52 
General[Message Deleted] Pin
sunit58-Sep-05 2:53
sunit58-Sep-05 2:53 
GeneralRe: wintrust.h Pin
Hans Ruck7-Sep-05 23:10
Hans Ruck7-Sep-05 23:10 
Questionlistview items dont appear Pin
/*Trucker*\7-Sep-05 20:52
/*Trucker*\7-Sep-05 20:52 
Hello,

In my MFC application, I am having a problem with my listview's items. They don't show. It looks like they are there because when they load the scroll bars appear.

The following code is OnCreate() where I Initialize the listView:

int CTopRightView::OnCreate(LPCREATESTRUCT lpCreateStruct)<br />
{<br />
	if (CView::OnCreate(lpCreateStruct) == -1)<br />
		return -1;<br />
<br />
	SetWindowLong(GetListCtrl().m_hWnd, GWL_STYLE,<br />
				  WS_VISIBLE|WS_CHILD|LVS_LIST);<br />
<br />
	COLORREF c = PALETTERGB(200, 70, 130);<br />
	GetListCtrl().SetBkColor(c);<br />
<br />
	//creating image list for listview<br />
	smallImageList.Create(16,16,false,1,0);<br />
<br />
	//adding icon to image list<br />
	HICON hIcon = ::LoadIcon(AfxGetResourceHandle(), <br />
							MAKEINTRESOURCE(IDI_ICON3));<br />
	smallImageList.Add(hIcon);<br />
<br />
	GetListCtrl().SetImageList(&smallImageList, LVSIL_SMALL);<br />
<br />
	return 0;<br />
}


And this piece of code adds an item to the listview:
<br />
		LV_ITEM lvItem;<br />
		::memset(&lvItem, 0, sizeof(LV_ITEM));<br />
		lvItem.mask = LVIF_TEXT|LVIF_IMAGE|LVIF_STATE;<br />
		lvItem.state = 0;<br />
		lvItem.stateMask = 0;<br />
		lvItem.pszText = GetNTS(GetDocument()->fileName);<br />
		lvItem.iItem = GetDocument()->fileCount;<br />
		lvItem.iImage = 0;<br />
<br />
		GetListCtrl().InsertItem(&lvItem);


Anybody might know what I am doing wrong?D'Oh! | :doh:

TraileR ParK LifE 4Ever
AnswerRe: listview items dont appear Pin
David Crow8-Sep-05 3:05
David Crow8-Sep-05 3:05 
GeneralRe: listview items dont appear Pin
/*Trucker*\8-Sep-05 17:42
/*Trucker*\8-Sep-05 17:42 
GeneralRe: listview items dont appear Pin
David Crow9-Sep-05 2:19
David Crow9-Sep-05 2:19 
GeneralRe: listview items dont appear Pin
/*Trucker*\9-Sep-05 8:04
/*Trucker*\9-Sep-05 8:04 
QuestionEdit box Pin
Nishad S7-Sep-05 20:25
Nishad S7-Sep-05 20:25 
AnswerRe: Edit box Pin
toxcct7-Sep-05 20:35
toxcct7-Sep-05 20:35 
GeneralRe: Edit box Pin
Nishad S7-Sep-05 20:45
Nishad S7-Sep-05 20:45 
GeneralRe: Edit box Pin
toxcct7-Sep-05 20:47
toxcct7-Sep-05 20:47 
GeneralRe: Edit box Pin
Nishad S7-Sep-05 21:26
Nishad S7-Sep-05 21:26 
GeneralRe: Edit box Pin
David Crow8-Sep-05 3:11
David Crow8-Sep-05 3:11 
AnswerRe: Edit box Pin
Christian Graus7-Sep-05 20:53
protectorChristian Graus7-Sep-05 20:53 
AnswerRe: Edit box Pin
Eytukan7-Sep-05 23:49
Eytukan7-Sep-05 23:49 
AnswerRe: Edit box Pin
MailtoGops8-Sep-05 2:52
MailtoGops8-Sep-05 2:52 
AnswerRe: Edit box Pin
David Crow8-Sep-05 3:06
David Crow8-Sep-05 3:06 
QuestionHTMLView Problem...help. Pin
babyspidy7-Sep-05 20:21
babyspidy7-Sep-05 20:21 
AnswerRe: HTMLView Problem...help. Pin
nguyenvhn7-Sep-05 22:30
nguyenvhn7-Sep-05 22:30 
GeneralRe: HTMLView Problem...help. Pin
babyspidy7-Sep-05 23:37
babyspidy7-Sep-05 23: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.