Click here to Skip to main content
16,006,001 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to display url Pin
David Crow12-Sep-07 3:18
David Crow12-Sep-07 3:18 
AnswerRe: How to display url Pin
Rajesh R Subramanian12-Sep-07 0:48
professionalRajesh R Subramanian12-Sep-07 0:48 
QuestionRe: How to display url Pin
Hamid_RT12-Sep-07 7:02
Hamid_RT12-Sep-07 7:02 
Questionhow to display URL in MFC Pin
yadahav11-Sep-07 22:48
yadahav11-Sep-07 22:48 
QuestionRe: how to display URL in MFC Pin
David Crow12-Sep-07 3:20
David Crow12-Sep-07 3:20 
QuestionCListCtrl & LVN_ITEMACTIVATE Pin
josip cagalj11-Sep-07 22:36
josip cagalj11-Sep-07 22:36 
AnswerRe: CListCtrl & LVN_ITEMACTIVATE Pin
nbugalia11-Sep-07 23:28
nbugalia11-Sep-07 23:28 
AnswerRe: CListCtrl & LVN_ITEMACTIVATE Pin
Nelek12-Sep-07 0:21
protectorNelek12-Sep-07 0:21 
In the creation or initialitation of your control you should tell the control to accept what you want.

void CParamRegTabView::InitializeView()
{
// List initialization
	// List styles
	DWORD dwStyle;
	dwStyle = LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES;
	m_clcList.SetExtendedStyle (dwStyle);
//...
}


and then just use:

void CMyTabView::OnClickMyTabRuleList(NMHDR* pNMHDR, LRESULT* pResult) 
{	POSITION pos = m_clcList.GetFirstSelectedItemPosition();
	if (!pos)
	{	m_nRowNum = -1;
		UpdateData (FALSE);
	}
	
	while (pos)
	{	int nPos = m_clcList.GetNextSelectedItem(pos);
		m_nRowNum = nPos;
		UpdateData (FALSE);
	}

	Invalidate ();			UpdateWindow ();
	*pResult = 0;
	return;
}


and

void CMyTabView::OnItemchangedMyTablist(NMHDR* pNMHDR, LRESULT* pResult) 
{	NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
	
	POSITION pos = m_clcList.GetFirstSelectedItemPosition();
	while (pos)
	{	int nPos = m_clcList.GetNextSelectedItem(pos);
		m_nRowNum = nPos;
		UpdateData (FALSE);
	}
	
	*pResult = 0;
	return;
}


Actually you dont need the m_nRowNum, but I do... to know the index of the selected element and use it to look for and other things.

Greetings.

--------
M.D.V.

If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?

AnswerRe: CListCtrl & LVN_ITEMACTIVATE Pin
josip cagalj12-Sep-07 0:36
josip cagalj12-Sep-07 0:36 
AnswerRe: CListCtrl & LVN_ITEMACTIVATE Pin
David Crow12-Sep-07 3:23
David Crow12-Sep-07 3:23 
QuestionEvent ID : How to use Pin
Programm3r11-Sep-07 22:18
Programm3r11-Sep-07 22:18 
AnswerRe: Event ID : How to use Pin
Mark Salsbery12-Sep-07 8:13
Mark Salsbery12-Sep-07 8:13 
Questionhow to initialize IMessage?? Pin
monsieur_jj11-Sep-07 22:17
monsieur_jj11-Sep-07 22:17 
AnswerRe: how to initialize IMessage?? Pin
Waldermort11-Sep-07 23:44
Waldermort11-Sep-07 23:44 
GeneralRe: how to initialize IMessage?? Pin
David Crow12-Sep-07 3:24
David Crow12-Sep-07 3:24 
QuestionAccessing an ATL Dll across a network. Pin
PaulCammy11-Sep-07 21:28
PaulCammy11-Sep-07 21:28 
QuestionDirectory path validation problem Pin
Karismatic11-Sep-07 21:26
Karismatic11-Sep-07 21:26 
AnswerRe: Directory path validation problem Pin
Waldermort11-Sep-07 21:36
Waldermort11-Sep-07 21:36 
GeneralRe: Directory path validation problem Pin
Emilio Garavaglia11-Sep-07 21:47
Emilio Garavaglia11-Sep-07 21:47 
GeneralRe: Directory path validation problem Pin
Waldermort11-Sep-07 21:52
Waldermort11-Sep-07 21:52 
GeneralRe: Directory path validation problem Pin
Emilio Garavaglia11-Sep-07 22:34
Emilio Garavaglia11-Sep-07 22:34 
GeneralRe: Directory path validation problem Pin
Waldermort11-Sep-07 23:32
Waldermort11-Sep-07 23:32 
GeneralRe: Directory path validation problem Pin
David Crow12-Sep-07 3:28
David Crow12-Sep-07 3:28 
AnswerRe: Directory path validation problem Pin
Randor 11-Sep-07 22:13
professional Randor 11-Sep-07 22:13 
AnswerRe: Directory path validation problem Pin
kamalesh8212-Sep-07 3:07
kamalesh8212-Sep-07 3:07 

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.