Home > Software engineering >  MFCShellList controls, double-click the file to open, how to make it can't open the file, into
MFCShellList controls, double-click the file to open, how to make it can't open the file, into

Time:10-10

CodePudding user response:

Ask for help,

CodePudding user response:

Double-click the message response

CodePudding user response:

refer to the second floor schlafenhamster response:
double-click response message
to respond to the double click, but have no response

CodePudding user response:

But have no reaction
In the code

CodePudding user response:

Response of the NM_DBLCLK news, temporarily didn't write inside the body of the function, is a test statements, is now the news didn't go in the
ON_NOTIFY (NM_DBLCLK IDC_MFCSHELLLIST1, & amp; Chrome_dialog: : OnDblclkMfcshelllist1)
Void chrome_dialog: : OnDblclkMfcshelllist1 (NMHDR * pNMHDR, LRESULT * pResult)
{
LPNMITEMACTIVATE pNMItemActivate=reinterpret_cast & lt; LPNMITEMACTIVATE> (pNMHDR);
//TODO: add the control notification handler code
PNMHDR NM_LISTVIEW * pNMListView=(NM_LISTVIEW *);
Int nItem=pNMListView - & gt; IItem.
If (nItem & gt;=0 & amp; & NItem{
int i=0;
}
* pResult=0;
}

CodePudding user response:

Can be overloaded OnNotify processing
 
BOOL CDlg2Dlg: : OnNotify (WPARAM WPARAM, LPARAM LPARAM, LRESULT * pResult)
{
//TODO: add in this dedicated code and/or call the base class
LParam NMHDR * pNMHDR=(NMHDR *);
If (pNMHDR - & gt; HwndFrom==m_wndShellList. M_hWnd
& & PNMHDR - & gt; Code==NM_DBLCLK)
{
LPNMITEMACTIVATE pNMItemActivate=reinterpret_cast & lt; LPNMITEMACTIVATE> (pNMHDR);

//Add your code here

* pResult=0;
Return TRUE;
}

Return CDialog: : OnNotify (wParam, lParam pResult);
}



  • Related