我在程序中使用
EnumDesktopWindows(hdesk, (WNDENUMPROC)KillScreenSaverFunc, 0);编译时报错:'type cast':cannot convert from " to 'int(__stdcall*)(struct HWND __*,long)'
EnumDesktopWindows(hdesk, (WNDENUMPROC)KillScreenSaverFunc, 0);编译时报错:'type cast':cannot convert from " to 'int(__stdcall*)(struct HWND __*,long)'
解决方案 »
- TEXTOUT如何每行都显示文件的内容呢(以下代码关系不大)?
- 粘连的字符分割,有什么好的方法
- 怎么通过Web来远程配置串口设备??????????????????????????????????????????????????????
- #include <list> 编译不过?!
- 256色工具栏无法显示
- ado连接数据库,超级难题,大虾帮忙!
- 我能卖多少钱?
- 哪儿去了?????????
- 怎样将“1,2,3”以逗号分离成数组a(0) = 1 ,a(1) = 2 ,a(2) = 3 ????
- 如何有CSTOCKET的send传送非字符传
- 关于IIS过滤器的问题?
- 为什么一个编译没有任何问题的程序在运行时会出来IE错误报告?
#include <stdio.h>
#include <windows.h>BOOL CALLBACK EnumWindowsProc(HWND hwnd, LPARAM lParam)
{
char szCaption[256]; if (IsWindowVisible(hwnd))
{
GetWindowText(hwnd, szCaption, 256); printf("%s.\n", szCaption);
} return TRUE;
}int main(int argc, char* argv[])
{
DWORD dwThreadId;
HWINSTA hwinstaSave;
HDESK hdeskSave; hwinstaSave = GetProcessWindowStation();
dwThreadId = GetCurrentThreadId();
hdeskSave = GetThreadDesktop(dwThreadId);
EnumDesktopWindows(hdeskSave, EnumWindowsProc, NULL); return 0;
}