gpt4 book ai didi

c++ - 为什么 RemoveSplash 不再是 CMainFrame 的成员?

转载 作者:太空宇宙 更新时间:2023-11-04 14:39:00 25 4
gpt4 key购买 nike

此代码在 Visual C++ 6.0 下运行:

BOOL CSplashWnd::PreTranslateAppMessage(MSG *pMsg)
{
if (c_pSplashWnd == NULL)
return FALSE;

// If we get a keyboard or mouse message, hide the splash screen.
if ((pMsg->message == WM_KEYDOWN) ||
(pMsg->message == WM_SYSKEYDOWN) ||
(pMsg->message == WM_LBUTTONDOWN) ||
(pMsg->message == WM_RBUTTONDOWN) ||
(pMsg->message == WM_MBUTTONDOWN) ||
(pMsg->message == WM_NCLBUTTONDOWN) ||
(pMsg->message == WM_NCRBUTTONDOWN) ||
(pMsg->message == WM_NCMBUTTONDOWN))
{
// let main frame window remove the splash screen so timer is killed &
// Tip-of-the-Day is displayed (if appropriate)
CMainFrame *pWnd = (CMainFrame *) AfxGetMainWnd();
pWnd->RemoveSplash();

return TRUE; // message handled here
}

return FALSE; // message not handled
}

现在在 Visual Studio 2017 中我收到此错误消息:

error C2039: 'RemoveSplash': is not a member of 'CMainFrame'

当我在 MSDN 中搜索 RemoveSplash 时,没有找到任何结果...

这曾经是 CMainFrame 或 CFrameWnd 的一部分吗?有什么想法吗?

最佳答案

CMainFrame 从来都不是 MFC 的一部分,而是 VS 向导为您生成的框架窗口的默认名称。换句话说,这是自定义代码。

关于c++ - 为什么 RemoveSplash 不再是 CMainFrame 的成员?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47819562/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com