我想问我用鼠标拖动一个文件到我的窗口里面?是不是一定会发送一个wm_dropfile消息呢?为什么我继承了OnDropFile()函数,想要它弹出一个对话框,却做不到呢?
void CTest3View::OnDropFiles(HDROP hDropInfo)
{
// TODO: Add your message handler code here and/or call default
MessageBox("hello","wrong",MB_OK);
CView::OnDropFiles(hDropInfo);
}
BOOL CTest3App::InitInstance()
{
……
m_pMainWnd->DragAcceptFiles(TRUE);
EnableShellOpen();
RegisterShellFileTypes(TRUE);
……
}
void CTest3View::OnDropFiles(HDROP hDropInfo)
{
// TODO: Add your message handler code here and/or call default
MessageBox("hello","wrong",MB_OK);
CView::OnDropFiles(hDropInfo);
}
BOOL CTest3App::InitInstance()
{
……
m_pMainWnd->DragAcceptFiles(TRUE);
EnableShellOpen();
RegisterShellFileTypes(TRUE);
……
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货