日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

MFC实现 MSN QQ 窗口抖动

發布時間:2025/3/15 编程问答 17 豆豆
生活随笔 收集整理的這篇文章主要介紹了 MFC实现 MSN QQ 窗口抖动 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

終于成功了,研究了一上午,呵呵

水平低,實現這么點小功能也蠻有成就感的,一定得加到我畢業設計里

嘿嘿

好了 代碼貼出來

說實話這方法我自己都感覺好笨

哪位高手有好方法的,還請指教

void CWindouDlg::OnButton1()
{
?// TODO: Add your control notification handler code here

PlaySound(MAKEINTRESOURCE(IDR_WAVE1),AfxGetResourceHandle(),SND_ASYNC|
??? SND_RESOURCE|SND_NODEFAULT);//使用PlaySound需要包含頭文件Header: Declared in mmsystem.h.
????????????????????????????????//Import Library: Use winmm.lib.

?int ty=7;
?CRect?? m_rect;??
?GetWindowRect(&m_rect);??
?for(int i=0;i<70;i++)
?{
?SetWindowPos( NULL,m_rect.left,m_rect.top,0,0,SWP_NOSIZE );
??m_rect.top = m_rect.top + ty;?
??m_rect.left = m_rect.left - ty;
??SetWindowPos( NULL,m_rect.left,m_rect.top,0,0,SWP_NOSIZE );
??m_rect.top = m_rect.top - ty;?
??m_rect.left = m_rect.left + ty;
??SetWindowPos( NULL,m_rect.left,m_rect.top,0,0,SWP_NOSIZE );
??m_rect.top = m_rect.top - ty;?
??m_rect.left = m_rect.left + ty;
??SetWindowPos( NULL,m_rect.left,m_rect.top,0,0,SWP_NOSIZE );
??m_rect.top = m_rect.top + ty;?
??m_rect.left = m_rect.left - ty;
??SetWindowPos( NULL,m_rect.left,m_rect.top,0,0,SWP_NOSIZE );
?}
}

吃飯的時候又想了想回來又弄了一下,比上午弄的那個更像MSN 和QQ了 嘿嘿 代碼差不多

?int ty=5;
?CRect?? m_rect;??
?GetWindowRect(&m_rect);?
?int recordy=m_rect.left;
?int recordx=m_rect.top;

for(int i=0;i<3;i++)
?{
??? m_rect.left=recordy;
??? m_rect.top=recordx;
??? m_rect.top = m_rect.top + ty;?
??? m_rect.left = m_rect.left - ty;
??? SetWindowPos( NULL,m_rect.left,m_rect.top,0,0,SWP_NOSIZE );Sleep(35);
??? m_rect.top = m_rect.top -ty;
??? SetWindowPos( NULL,m_rect.left,m_rect.top,0,0,SWP_NOSIZE );Sleep(35);
??? m_rect.top = m_rect.top -2*ty;
??? SetWindowPos( NULL,m_rect.left,m_rect.top,0,0,SWP_NOSIZE );Sleep(35);
??? m_rect.left=m_rect.left+ty;
??? SetWindowPos( NULL,m_rect.left,m_rect.top,0,0,SWP_NOSIZE );Sleep(35);
??? m_rect.left=m_rect.left+2*ty;
??? SetWindowPos( NULL,m_rect.left,m_rect.top,0,0,SWP_NOSIZE );Sleep(35);
??? m_rect.top = m_rect.top + ty;?
??? SetWindowPos( NULL,m_rect.left,m_rect.top,0,0,SWP_NOSIZE );Sleep(35);
??? m_rect.top=m_rect.top+2*ty;
??? SetWindowPos( NULL,m_rect.left,m_rect.top,0,0,SWP_NOSIZE );
??? SetWindowPos( NULL,recordy,recordx,0,0,SWP_NOSIZE );
??? Sleep(35);
? }

總結

以上是生活随笔為你收集整理的MFC实现 MSN QQ 窗口抖动的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。