重温WIN32 API ------ SetTimer()无窗口调用方式
2014-12-25 20:43
344 查看
#include <stdio.h> #include <windows.h> #define IDT_TIMER 100 void CALLBACK TimerProc(HWND hwnd,UINT uMsg,UINT_PTR idEvent,DWORD dwTime) { SYSTEMTIME st; GetLocalTime(&st); printf("%2d:%2d:%2d.%3d hello!/n", st.wHour, st.wMinute, st.wSecond, st.wMilliseconds); } int main(int argc, char* argv[]) { int iret = SetTimer(NULL, IDT_TIMER, 1000, (TIMERPROC)TimerProc); MSG msg; while (1) { GetMessage(&msg, NULL, 0, 0); DispatchMessage(&msg); } return 0; }
相关文章推荐
- win32下的SetTimer()无窗口调用方式
- 重温WIN32 API ------ 窗口上绘制位图文件
- 重温WIN32 API ------ 最简单的Windows窗口封装类
- QTP调用win32 API 实现窗口的最小最大化
- 重温 Win32 API ----- 截屏指定窗口并打印
- (五下)安装ffi模块,使用electron调用win32 api, win32项目设置父子窗口关系
- 使用WIN32 API CreateProcess()以无窗口方式创建DOS程序
- dotnet调用win32 API创建窗口
- 使用WIN32 API CreateProcess()以无窗口方式创建DOS程序
- 使用WIN32 API CreateProcess()以无窗口方式创建DOS程序
- API方式(Foxpro中HtmlHelp)调用chm帮助文档(不用foxtools.fll获取窗口句柄)
- 转载暴强贴:从.NET平台调用Win32 API
- CSharp Tips:调用Win32 API如何处理指针类型的参数.doc
- MSIL 教程(二):数组、分支、循环、使用不安全代码和如何调用Win32 API
- 【翻译】MSIL 教程(二):数组、分支、循环、使用不安全代码和如何调用Win32 API
- 动态调用Win32 Function(API)
- vbscript,javascript 中调用 win32 API 的实现。
- win32 API窗口句柄的获得——我的经验
- 从.NET平台调用Win32 API
- 暴强贴:从.NET平台调用Win32 API