void CWindisavrView::OnRButtonDown(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
// to simulate the LBUTTONDOWN. This will set the caret at the position of where the Right Button Clicked.
GetEditCtrl().SendMessage(WM_LBUTTONDOWN,(WPARAM)nFlags,(LPARAM)((point.y<<16)+point.x));
GetEditCtrl().SendMessage(WM_LBUTTONUP,(WPARAM)nFlags,(LPARAM)((point.y<<16)+point.x));
// CEditView::OnRButtonDown(nFlags, point);
}
右擊改變不可直接用CEditView::OnLButtonDown(nFlags, point); MFC只查消息原始來源.
if(m_CyrrentFileName.Right(4).CompareNoCase(".hex")==0)
{
if(!Hex2Bin(lpszPathName))
{//hex file not available
return FALSE;
}
}
else if(m_CyrrentFileName.Right(4).CompareNoCase(".bin")==0)
{
CFile binfile;
binfile.Open(lpszPathName,CFile::modeRead|CFile::shareExclusive);
ReadBin(&binfile);
binfile.Close();
}
文件名大小寫處理