首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

SetWindowPos程序直接封锁

2013-03-06 
SetWindowPos程序直接关闭一个按钮移动的程序执行到SetWindowPos直接关闭了。void Escapbtn::OnMouseMove(U

SetWindowPos程序直接关闭
一个按钮移动的程序
执行到SetWindowPos直接关闭了。



void Escapbtn::OnMouseMove(UINT nFlags, CPoint point) 
{
// TODO: Add your message handler code here and/or call default
    int x,y;

x=rand()%m_rectDlg.Width();
y=rand()%m_rectDlg.Height();

    GetDlgItem(IDC_BUTTON1)->SetWindowPos(0,x,y,0,0,SWP_NOZORDER|SWP_NOSIZE);

CButton::OnMouseMove(nFlags, point);
}
mfc
[解决办法]
崩溃的时候在弹出的对话框按相应按钮进入调试,按Alt+7键查看Call Stack里面从上到下列出的对应从里层到外层的函数调用历史。双击某一行可将光标定位到此次调用的源代码或汇编指令处。

热点排行