Click here to Skip to main content
15,887,676 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Multiple Selection in ListView. Pin
Sameerkumar Namdeo11-May-11 1:20
Sameerkumar Namdeo11-May-11 1:20 
GeneralRe: Multiple Selection in ListView. Pin
Roger Broomfield11-May-11 1:42
Roger Broomfield11-May-11 1:42 
QuestionHow about the CPropertyPage OnOK ? [modified] Pin
wangningyu10-May-11 21:28
wangningyu10-May-11 21:28 
AnswerRe: How about the CPropertyPage OnOK ? Pin
Richard MacCutchan10-May-11 21:31
mveRichard MacCutchan10-May-11 21:31 
GeneralRe: How about the CPropertyPage OnOK ? Pin
wangningyu10-May-11 21:38
wangningyu10-May-11 21:38 
QuestionRe: How about the CPropertyPage OnOK ? Pin
Mark Salsbery11-May-11 5:17
Mark Salsbery11-May-11 5:17 
GeneralRe: How about the CPropertyPage OnOK ? Pin
David Crow11-May-11 6:07
David Crow11-May-11 6:07 
QuestionSDI and dialog communication Pin
lamrinraj10-May-11 18:33
lamrinraj10-May-11 18:33 
1. i have a SDI window application which open images
2. i have created a search dialog which reads excel as database and loads the datas into the listbox(listview) which resides on the same window.
3. upon user click over the list view content, the image get opened in the SDI window and i need to preserve the search results.

now i able to retrieve the item in the list box (list view) and send it to the Filebrowser() procedure....and opened the file using a global variable..

<br />
//CSearchDlg.cpp<br />
//implemented search dialog<br />
<br />
void SearchDlg::OnItemChanged(NMHDR* pNMHDR, LRESULT* pResult)<br />
{<br />
	NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;	<br />
	CString Coll = "";<br />
	LV_ITEM itemSelected;<br />
	int nSelected = lstCtrl.GetNextItem(-1,LVNI_SELECTED);<br />
<br />
	if(nSelected == -1) <br />
	{<br />
		AfxMessageBox("No more item selected");<br />
	}<br />
		TCHAR szTeamName[80];<br />
		itemSelected.iItem = nSelected;<br />
		itemSelected.iSubItem = 9;<br />
		itemSelected.mask = LVIF_PARAM | LVIF_TEXT;<br />
		itemSelected.pszText = szTeamName;<br />
		itemSelected.cchTextMax = 50;<br />
		lstCtrl.GetItem(&itemSelected);<br />
		<br />
		CString* pMessage = (CString*) itemSelected.lParam;<br />
		Coll+=szTeamName;		<br />
		Coll+="\\";<br />
		TCHAR temp[2] = "\\";<br />
		Coll.TrimRight(temp);<br />
		//AfxMessageBox(Coll+"\n");		<br />
		GetsubItems(Coll);<br />
		*pResult = 0;<br />
}<br />
<br />
<br />
void SearchDlg::GetsubItems(CString csItem)<br />
{<br />
	CString tem_drive = GetDriveName();<br />
	CString csFormAbsolutePath = "";	<br />
	csFormAbsolutePath = "Files\\" + csItem;	<br />
	ReturnPathToFileOpen(csFormAbsolutePath);<br />
}<br />

Here i enabled search dialog, according to the search criteria, it lists the results in the listview upon user clicks i need to open the image. here subitem name(usually file name)gives the filename. i want to open the file in the client area.


<br />
CSearchDlg ObjSearch;<br />
ObjSearch.DoModal();<br />


Here the Fileopen was implemented in CImageView.cpp
inside i get the filename with path using global variable, here i couldn't preserve the search results.

i want to know what wrong i did here and how to implement the same.
AnswerRe: SDI and dialog communication Pin
Hans Dietrich10-May-11 19:37
mentorHans Dietrich10-May-11 19:37 
GeneralRe: SDI and dialog communication Pin
lamrinraj10-May-11 22:47
lamrinraj10-May-11 22:47 
AnswerRe: SDI and dialog communication Pin
JohnCz14-May-11 12:03
JohnCz14-May-11 12:03 
QuestionDesign Pattern of separating data and business logic Pin
Berlus10-May-11 10:44
Berlus10-May-11 10:44 
AnswerRe: Design Pattern of separating data and business logic Pin
_AnsHUMAN_ 10-May-11 18:21
_AnsHUMAN_ 10-May-11 18:21 
AnswerRe: Design Pattern of separating data and business logic Pin
ShilpiP10-May-11 20:07
ShilpiP10-May-11 20:07 
QuestionCompletely custom Edit control Pin
csrss10-May-11 8:56
csrss10-May-11 8:56 
AnswerRe: Completely custom Edit control Pin
Chris Losinger10-May-11 9:45
professionalChris Losinger10-May-11 9:45 
GeneralRe: Completely custom Edit control Pin
csrss10-May-11 11:37
csrss10-May-11 11:37 
Questionfind diffrence between current time and birthday as a number of days. Pin
quartaela10-May-11 6:54
quartaela10-May-11 6:54 
AnswerRe: find diffrence between current time and birthday as a number of days. Pin
Chris Losinger10-May-11 7:43
professionalChris Losinger10-May-11 7:43 
GeneralRe: find diffrence between current time and birthday as a number of days. Pin
quartaela10-May-11 7:47
quartaela10-May-11 7:47 
GeneralRe: find diffrence between current time and birthday as a number of days. Pin
Chris Losinger10-May-11 7:51
professionalChris Losinger10-May-11 7:51 
AnswerRe: find diffrence between current time and birthday as a number of days. Pin
Richard MacCutchan10-May-11 7:54
mveRichard MacCutchan10-May-11 7:54 
GeneralRe: find diffrence between current time and birthday as a number of days. Pin
quartaela10-May-11 8:04
quartaela10-May-11 8:04 
GeneralRe: find diffrence between current time and birthday as a number of days. Pin
Richard MacCutchan10-May-11 8:32
mveRichard MacCutchan10-May-11 8:32 
GeneralRe: find diffrence between current time and birthday as a number of days. Pin
quartaela10-May-11 11:57
quartaela10-May-11 11:57 

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.