
vc用程序隐藏鼠标问题 10
VC用ShowCursor(FALSE);隐藏鼠标具体怎么实现呢,哪位给我个源码,我试试,我试过的总是显示头文件错误呢...e:\c语言\vc98\include\win...
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 展开
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 展开
1个回答
展开全部
不需要加任何头文件 直接加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
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询