怎样响应F1的默认帮助消息! thanks! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 BOOL CGetFlashDlg::PreTranslateMessage(MSG* pMsg) { if (pMsg->message == 0x4d) { // Magical mystical MFC F1 Help msg! if (GetKeyState(VK_SHIFT) >= 0) { // Shift key not down // Supply general dialog level help // OnCommandHelp(0, 0); OnHelpInfo(NULL); return(TRUE); // Eat it }#ifdef FLOATING_ARROW else { // Use this if you want Shift+F1 to create the floating arrow instead SendMessage(WM_SYSCOMMAND, SC_CONTEXTHELP); return(TRUE); }#endif FLOATING_ARROW } return CDialog::PreTranslateMessage(pMsg);}BOOL CGetFlashDlg::OnHelpInfo(HELPINFO* pHelpInfo) { char dir[256]=""; GetModuleFileName(NULL,dir,256); CString str(dir),floder; int n=0,m; while((n=str.Find("\\",n+1))!=-1) m=n; floder=str.Mid(0,m); floder+="\\GetFlash.chm"; ShellExecute(m_hWnd, _T("open"),floder, NULL,NULL,SW_SHOW); return TRUE;} 还有就是你可以重载框架类的OnWinhelp()函数,在其中写你的代码,然后不要调用父类的函数。 控件动态创建和静态创建的问题。 获取控件窗口对象 c调用对话框 弦截法。。请问各位下面弦截法求值的哪里出了问题,想了好久!!谢谢了!! 关于多线程的一点问题谢谢指点 做过输入法的大虾请进,如何做到微软拼音一样的下划线? 一个关于UI线程的问题 请教:如何得知CStatic文本控件有多高??? 如何在VC-SOCKET中发送与接收数据设定超时? 菜鸟问题系列二-------基于对话框摸板的VC工程里…………………… 百分求解之问题四:有关MS的选中问题? 很简单的问题?????初学(在线等)
BOOL CGetFlashDlg::PreTranslateMessage(MSG* pMsg)
{
if (pMsg->message == 0x4d) {
// Magical mystical MFC F1 Help msg!
if (GetKeyState(VK_SHIFT) >= 0) {
// Shift key not down
// Supply general dialog level help
// OnCommandHelp(0, 0);
OnHelpInfo(NULL);
return(TRUE); // Eat it
}
#ifdef FLOATING_ARROW
else {
// Use this if you want Shift+F1 to create the floating arrow instead
SendMessage(WM_SYSCOMMAND, SC_CONTEXTHELP);
return(TRUE);
}
#endif FLOATING_ARROW
}
return CDialog::PreTranslateMessage(pMsg);
}BOOL CGetFlashDlg::OnHelpInfo(HELPINFO* pHelpInfo)
{
char dir[256]="";
GetModuleFileName(NULL,dir,256);
CString str(dir),floder;
int n=0,m;
while((n=str.Find("\\",n+1))!=-1)
m=n;
floder=str.Mid(0,m); floder+="\\GetFlash.chm";
ShellExecute(m_hWnd, _T("open"),floder, NULL,NULL,SW_SHOW);
return TRUE;
}