Click here to Skip to main content
15,903,030 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i had to make a list in which i had to show some pictures and on clicking that image want to divert to a new dialog
Posted

I know a very good site where you will find solution to your problem. It is google.com
If you will not be able to understand the technical articles, samples and documentation from google, then you would have to read a manual. In this case you will need to search it here: google.com.
If you still will have question after reading manual and searching web, then post it in codeproject.
 
Share this answer
 
v2
If you have a CListCtrl or CListView derived class, add a NM_CLICK handler to that class. In that handler cast the passed NMHDR structure pointer to LPNMITEMACTIVATE to get the information on the clicked item and sub-item.

Example:
C++
void CMyListCtrl::OnNMClick(NMHDR * pNMHDR, LRESULT *pResult)
{
    LPNMITEMACTIVATE lpnmitem = reinterpret_cast<LPNMITEMACTIVATE>(pNMHDR);
    if (lpnmitem->iItem == 1 && lpnmitem->iSubItem == 2)
    {
        CMyDialog Dlg;
        Dlg.DoModal();
    }
    *pResult = 0;
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900