VC用ShowCursor(FALSE);隐藏鼠标具体怎么实现呢,哪位给我个源码,我试试,我试过的总是显示头文件错误呢...
e:\c语言\vc98\include\winuser.h(39) : error C2146: syntax error : missing ';' before identifier 'HDWP'
e:\c语言\vc98\include\winuser.h(39) : fatal error C1004: unexpected end of file found
vc用程序隐藏鼠标问题
答案:1 悬赏:40 手机版
解决时间 2021-03-22 05:33
- 提问者网友:戎马万世
- 2021-03-21 05:48
最佳答案
- 五星知识达人网友:撞了怀
- 2021-03-21 06:53
不需要加任何头文件 直接加ShowCursor(FALSE);
就比如在初始化函数中:
BOOL CMy234Dlg::OnInitDialog()
{
CDialog::OnInitDialog();
// Add "About..." menu item to system menu.
// IDM_ABOUTBOX must be in the system command range.
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
ASSERT(IDM_ABOUTBOX < 0xF000);
CMenu* pSysMenu = GetSystemMenu(FALSE);
if (pSysMenu != NULL)
{
CString strAboutMenu;
strAboutMenu.LoadString(IDS_ABOUTBOX);
if (!strAboutMenu.IsEmpty())
{
pSysMenu->AppendMenu(MF_SEPARATOR);
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
}
}
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
// TODO: Add extra initialization here
ShowCursor(FALSE);
return TRUE; // return TRUE unless you set the focus to a control
}
就比如在初始化函数中:
BOOL CMy234Dlg::OnInitDialog()
{
CDialog::OnInitDialog();
// Add "About..." menu item to system menu.
// IDM_ABOUTBOX must be in the system command range.
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
ASSERT(IDM_ABOUTBOX < 0xF000);
CMenu* pSysMenu = GetSystemMenu(FALSE);
if (pSysMenu != NULL)
{
CString strAboutMenu;
strAboutMenu.LoadString(IDS_ABOUTBOX);
if (!strAboutMenu.IsEmpty())
{
pSysMenu->AppendMenu(MF_SEPARATOR);
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
}
}
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
// TODO: Add extra initialization here
ShowCursor(FALSE);
return TRUE; // return TRUE unless you set the focus to a control
}
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯