KillTimer析构函数
生活随笔
收集整理的這篇文章主要介紹了
KillTimer析构函数
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
析構(gòu)函數(shù)中不能用KillTimer,
原因:在析構(gòu)函數(shù)中窗口已經(jīng)不存在,所以KillTimer函數(shù)已經(jīng)沒有了窗口句柄,當(dāng)然會出錯
?
使用位置:BOOL DestroyWindow(void)函數(shù)中.
如:
BOOL TestDlg::DestroyWindow()
{
???? // TODO: Add your specialized code here and/or call the base class
??? KillTimer(1);
?? return CDialog::DestroyWindow();
}
原因:在析構(gòu)函數(shù)中窗口已經(jīng)不存在,所以KillTimer函數(shù)已經(jīng)沒有了窗口句柄,當(dāng)然會出錯
?
使用位置:BOOL DestroyWindow(void)函數(shù)中.
如:
BOOL TestDlg::DestroyWindow()
{
???? // TODO: Add your specialized code here and/or call the base class
??? KillTimer(1);
?? return CDialog::DestroyWindow();
}
轉(zhuǎn)載于:https://www.cnblogs.com/huking/archive/2009/11/27/1612201.html
總結(jié)
以上是生活随笔為你收集整理的KillTimer析构函数的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: java中log4j的详解(转)
- 下一篇: 我的奔腾B50 MT豪华版 典雅灰 –