Click here to Skip to main content
15,888,967 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Get Volume Name From Path Pin
Niklas L1-Mar-11 0:43
Niklas L1-Mar-11 0:43 
GeneralRe: Get Volume Name From Path Pin
Hans Dietrich1-Mar-11 1:23
mentorHans Dietrich1-Mar-11 1:23 
GeneralRe: Get Volume Name From Path Pin
Niklas L1-Mar-11 1:47
Niklas L1-Mar-11 1:47 
QuestionMFC command line in VC6.0 - repost Pin
Vaclav_28-Feb-11 4:07
Vaclav_28-Feb-11 4:07 
AnswerRe: MFC command line in VC6.0 - repost Pin
Hans Dietrich28-Feb-11 4:50
mentorHans Dietrich28-Feb-11 4:50 
GeneralSOLVED Re: MFC command line in VC6.0 - repost Pin
Vaclav_28-Feb-11 6:00
Vaclav_28-Feb-11 6:00 
QuestionHow can handle double click event in listctrl of checkbox style? Pin
Le@rner27-Feb-11 22:32
Le@rner27-Feb-11 22:32 
AnswerRe: How can handle double click event in listctrl of checkbox style? Pin
Hans Dietrich27-Feb-11 22:51
mentorHans Dietrich27-Feb-11 22:51 
The solution to this is the NM_DBLCLK notification message; for more info see here: http://msdn.microsoft.com/en-us/library/bb774867%28v=vs.85%29.aspx[^]

Here is a code snippet:
void MyDlg::OnDblClick(NMHDR* pNMHDR, LRESULT* pResult)
{
    LPNMITEMACTIVATE pNMIA = reinterpret_cast<LPNMITEMACTIVATE>(pNMHDR);

    int nItem = -1;
    int nSubItem = -1;

    if (pNMIA)
    {
        nItem = pNMIA->iItem;
        nSubItem = pNMIA->iSubItem;
    }

    if (nItem >= 0 && nSubItem >= 0)
    {
        CString strText = m_List.GetItemText(nItem, nSubItem);
        TRACE(_T("OnDblClick at (%d,%d):  '%s'"), nItem, nSubItem, strText);
    }

    *pResult = 0;
}


The message map entry looks like:
ON_NOTIFY(NM_DBLCLK, IDC_LIST, OnDblClick)

This gives you the sub-item of the click, and from that you can tell whether the checkbox column was clicked.
Best wishes,
Hans


[Hans Dietrich Software]

GeneralRe: How can handle double click event in listctrl of checkbox style? Pin
Le@rner27-Feb-11 23:13
Le@rner27-Feb-11 23:13 
GeneralRe: How can handle double click event in listctrl of checkbox style? Pin
Hans Dietrich27-Feb-11 23:19
mentorHans Dietrich27-Feb-11 23:19 
GeneralRe: How can handle double click event in listctrl of checkbox style? Pin
Le@rner27-Feb-11 23:53
Le@rner27-Feb-11 23:53 
GeneralRe: How can handle double click event in listctrl of checkbox style? Pin
Niklas L27-Feb-11 23:35
Niklas L27-Feb-11 23:35 
GeneralRe: How can handle double click event in listctrl of checkbox style? Pin
Le@rner27-Feb-11 23:55
Le@rner27-Feb-11 23:55 
GeneralRe: How can handle double click event in listctrl of checkbox style? Pin
Richard MacCutchan28-Feb-11 0:55
mveRichard MacCutchan28-Feb-11 0:55 
GeneralRe: How can handle double click event in listctrl of checkbox style? Pin
Cool_Dev28-Feb-11 1:00
Cool_Dev28-Feb-11 1:00 
GeneralRe: How can handle double click event in listctrl of checkbox style? Pin
Richard MacCutchan28-Feb-11 1:12
mveRichard MacCutchan28-Feb-11 1:12 
GeneralRe: How can handle double click event in listctrl of checkbox style? Pin
Cool_Dev28-Feb-11 1:59
Cool_Dev28-Feb-11 1:59 
GeneralRe: How can handle double click event in listctrl of checkbox style? Pin
Richard MacCutchan28-Feb-11 6:00
mveRichard MacCutchan28-Feb-11 6:00 
GeneralRe: How can handle double click event in listctrl of checkbox style? [modified] Pin
Cool_Dev27-Feb-11 23:57
Cool_Dev27-Feb-11 23:57 
GeneralRe: How can handle double click event in listctrl of checkbox style? Pin
Le@rner28-Feb-11 0:20
Le@rner28-Feb-11 0:20 
QuestionGetComboBoxInfo implementation Pin
mesajflaviu27-Feb-11 20:05
mesajflaviu27-Feb-11 20:05 
AnswerRe: GetComboBoxInfo implementation Pin
Andrew Brock27-Feb-11 21:28
Andrew Brock27-Feb-11 21:28 
GeneralRe: GetComboBoxInfo implementation Pin
mesajflaviu27-Feb-11 22:27
mesajflaviu27-Feb-11 22:27 
GeneralRe: GetComboBoxInfo implementation Pin
mesajflaviu27-Feb-11 22:29
mesajflaviu27-Feb-11 22:29 
QuestionBest Algorithm to merge two tree structured object? [modified] Pin
yogish29327-Feb-11 19:54
yogish29327-Feb-11 19:54 

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.