摘要: 核心利用win心跳函数GetTickCount利用差量锁定fps,如下代码锁定30fps,缺点为如果计算机不能以30fps运行,程序将低于30fps #define WIN32_LEAN_AND_MEAN // just say no to MFC#include // include all the windows headers#include // include use... 阅读全文
posted @ 2013-09-15 20:37 xxx1 阅读(321) 评论(0) 推荐(0) 编辑
摘要: WM_PAINT消息触发程序重新绘制界面,过程如下: PAINTSTRUCT ps; // used in WM_PAINT HDC hdc; // handle to a device context case WM_PAINT: { hdc = BeginPaint(hwnd,&ps); EndPaint(hwnd,&... 阅读全文
posted @ 2013-09-15 20:32 xxx1 阅读(486) 评论(0) 推荐(0) 编辑
摘要: windows消息传来的参数分解: Message: WM_ACTIVATE Parameterization: fActive = LOWORD(wParam); // activation flag fMinimized = (BOOL)HIWORD(wParam); // minimized flag hwndPrevious = (HWND)lPa... 阅读全文
posted @ 2013-09-15 15:33 xxx1 阅读(300) 评论(0) 推荐(0) 编辑