模拟QQ窗口抖动效果(通过MoveWindow和Sleep进行模拟)
2024-08-30 06:09:10
- RECT rtWindow;
- GetWindowRect(&rtWindow);
- //long x = 400;
- //long y = 200;
- long x = rtWindow.left;
- long y = rtWindow.top;
- long cxWidth = rtWindow.right-rtWindow.left;
- long cyHeight = rtWindow.bottom-rtWindow.top;
- const long nOffset = 9;
- const long SLEEP_INTERAL = 60;
- for(long i=0; i<=2; ++i)
- {
- ::MoveWindow(m_hWnd, x+nOffset, y-nOffset, cxWidth, cyHeight, TRUE);
- ::Sleep(SLEEP_INTERAL);
- ::MoveWindow(m_hWnd, x-nOffset, y-nOffset, cxWidth, cyHeight, TRUE);
- ::Sleep(SLEEP_INTERAL);
- ::MoveWindow(m_hWnd, x-nOffset, y+nOffset, cxWidth, cyHeight, TRUE);
- ::Sleep(SLEEP_INTERAL);
- ::MoveWindow(m_hWnd, x+nOffset, y+nOffset ,cxWidth, cyHeight, TRUE);
- ::Sleep(SLEEP_INTERAL);
- ::MoveWindow(m_hWnd, x, y, cxWidth, cyHeight, TRUE);
- ::Sleep(SLEEP_INTERAL);
- }
参考:http://www.rupeng.com/forum/thread-6423-1-1.html
http://blog.csdn.net/analogous_love/article/details/47979739
最新文章
- kettle系列-4.kettle定制化开发工具类
- [python学习] 介绍python的property,以及为什么要用setter,一个小栗子
- app性能测试点、安全测试点总结
- tomcat监控脚本
- vs开发工具之--自动生成注释
- c#和UDP SOCKET广播
- NET 项目结构搭建
- MVVM前后分离轻量级框架应用juicer和doT.js
- mysql单表多表查询
- 【php增删改查实例】第十节 - 部门管理模块(新增功能)
- MyIbatis和Hibernate的区别--2019-04-26
- Game Engine Architecture 5
- [转载]SpringBoot系列: SpringMVC 参数绑定注解解析
- WebHttpRequest在sharepoint文档库中的使用
- Flask实例化的参数 及 对app的配置
- mysql服务启动、停止、重启
- DELPHI各种颜色表达式
- Maven 下载安装
- MacOS在Finder中建立快速新建txt的workflow
- 拯救者14ISK添加ssd6记录
热门文章
- js匿名自执行函数
- [React Router v4] Conditionally Render a Route with the Switch Component
- NSArray NSMutableArray 初始化
- python 爬取36kr 7x24h快讯
- 为什么java的web开发中URLEncoder.encode方法要为什么要调用两次
- dropzone上传文件
- windows server 安装 mysql – 畅玩Coding
- Vue 兄弟组件之间传递数值
- 简单几步教你实现移动硬盘PE、装win7/vista! 一盘在手,系统无忧!
- VC++实现Vista和Win7系统低权限程序向高权限程序发消息