Click here to Skip to main content
15,914,109 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Dialog for server and client Pin
ThatsAlok7-Sep-05 23:21
ThatsAlok7-Sep-05 23:21 
AnswerRe: Dialog for server and client Pin
David Crow8-Sep-05 2:53
David Crow8-Sep-05 2:53 
GeneralRe: Dialog for server and client Pin
Member 21610048-Sep-05 15:07
Member 21610048-Sep-05 15:07 
Questionsetting bitmap images on push buttons Pin
sayup7-Sep-05 21:45
sayup7-Sep-05 21:45 
AnswerRe: setting bitmap images on push buttons Pin
nguyenvhn7-Sep-05 22:11
nguyenvhn7-Sep-05 22:11 
AnswerRe: setting bitmap images on push buttons Pin
ThatsAlok7-Sep-05 23:18
ThatsAlok7-Sep-05 23:18 
AnswerRe: setting bitmap images on push buttons Pin
Eytukan7-Sep-05 23:59
Eytukan7-Sep-05 23:59 
AnswerRe: setting bitmap images on push buttons Pin
Eytukan8-Sep-05 0:02
Eytukan8-Sep-05 0:02 
AnswerRe: setting bitmap images on push buttons Pin
Lefteris_RG31208-Sep-05 1:24
Lefteris_RG31208-Sep-05 1:24 
AnswerRe: setting bitmap images on push buttons Pin
David Crow8-Sep-05 2:54
David Crow8-Sep-05 2:54 
Questionwintrust.h Pin
sunit57-Sep-05 21:21
sunit57-Sep-05 21:21 
AnswerRe: wintrust.h Pin
nguyenvhn7-Sep-05 22:07
nguyenvhn7-Sep-05 22:07 
GeneralRe: wintrust.h Pin
sunit57-Sep-05 22:48
sunit57-Sep-05 22:48 
GeneralRe: wintrust.h Pin
toxcct7-Sep-05 22:53
toxcct7-Sep-05 22:53 
AnswerRe: wintrust.h Pin
ThatsAlok7-Sep-05 23:17
ThatsAlok7-Sep-05 23:17 
GeneralRe: wintrust.h Pin
Eytukan8-Sep-05 0:23
Eytukan8-Sep-05 0:23 
GeneralRe: wintrust.h Pin
ThatsAlok8-Sep-05 0:37
ThatsAlok8-Sep-05 0:37 
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

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.