在单击图片时,必须转到另一个对话框 [英] on clicking picture ,have to go to another dialog

查看:68
本文介绍了在单击图片时,必须转到另一个对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须列出一个列表,其中必须显示一些图片,然后单击该图片以转移到新对话框中.

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

推荐答案

我知道一个很好的网站,您可以在其中找到解决问题的方法.是google.com
如果您将无法理解Google的技术文章,示例和文档,则必须阅读手册.在这种情况下,您需要在以下位置进行搜索:google.com.
如果您在阅读手册和搜索网络后仍然有疑问,请将其发布在codeproject中.
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.


如果您有CListCtrlCListView派生类,请添加NM_CLICK处理程序到那个班级.在该处理程序中,将传递的NMHDR结构指针转换为LPNMITEMACTIVATE以获取有关单击的项目和子项目的信息.

示例:
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:
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;
}


这篇关于在单击图片时,必须转到另一个对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆