|
|
|
[求助]c++6.0的动态数组如何加入多个句柄?
恩...谢谢 果然是数组越界 定义HWND *ahwnd=new HWND[1000]; 就没有问题了 |
|
[求助]c++6.0的动态数组如何加入多个句柄?
--------------------Configuration: hwnd - Win32 Debug-------------------- hwnd.exe - 0 error(s), 0 warning(s) 编译时没有错误,但是运行的时候却出现错误,Release模式没有这个问题。 谢谢小虾版主的热心指导。 |
|
[求助]c++6.0的动态数组如何加入多个句柄?
小虾版主。。。。为什么在 Debug 调试模式会出现一个错误 而Release 却不会? #include <stdio.h> #include <windows.h> HWND *aHwnd=new HWND[256]; int i=1; char *tit=new char[256]; BOOL CALLBACK EnumWindowsProc( HWND hwnd, // handle to parent window LPARAM lParam // application-defined value ) { if (hwnd) { aHwnd[i]=hwnd; GetWindowTextA(aHwnd[i],(LPSTR)tit,255); printf("%d: %s\n",aHwnd[i],tit); i++; return TRUE; }else { delete tit; delete aHwnd; return FALSE; } } int main() { ::EnumWindows((WNDENUMPROC)EnumWindowsProc,0); delete aHwnd; delete tit; return 0; } |
|
[求助]c++6.0的动态数组如何加入多个句柄?
HWND aHwnd[256]; int i; BOOL CALLBACK EnumWindowsProc( HWND hwnd, // handle to parent window LPARAM lParam // application-defined value ) { if (hwnd) { aHwnd[i]=hwnd; printf("%d\n",aHwnd[i]); i++; return TRUE; }else { return FALSE; } } ::EnumWindows((WNDENUMPROC)EnumWindowsProc,0); --------------------Configuration: hwnd - Win32 Debug-------------------- Compiling... hwnd.cpp C:\Documents and Settings\cd\桌面\C++\hwnd\hwnd.cpp(5) : error C2146: syntax error : missing ';' before identifier 'aHwnd' C:\Documents and Settings\cd\桌面\C++\hwnd\hwnd.cpp(5) : error C2501: 'HWND' : missing storage-class or type specifiers C:\Documents and Settings\cd\桌面\C++\hwnd\hwnd.cpp(5) : fatal error C1004: unexpected end of file found Error executing cl.exe. hwnd.exe - 3 error(s), 0 warning(s) 求版主和各位大大再帮帮忙。。。。 |
|
[求助]c++6.0的动态数组如何加入多个句柄?
谢谢 小虾版主...非常感谢!~ |
|
[原创]”彩屏“
经典 效果不错 |
|
[求助]如何挂勾外部程序的WM_CLOSE消息? 使之不被此消息关闭
#include <windows.h> #pragma data_seg(".luck") HHOOK hook=NULL; #pragma data_seg() LRESULT CALLBACK GetMsgProc( int code, // hook code WPARAM wParam, // removal option LPARAM lParam // message ) { if(code>0) { if (code==HCBT_DESTROYWND) { // MessageBoxA(0,"已经拦截到关闭消息","提示",64); return 1; } } return CallNextHookEx(hook,code,wParam,lParam); } int WINAPI onhook() { hook=SetWindowsHookExA(WH_CBT,GetMsgProc,GetModuleHandleA("hook.dll"),0); return (int)hook; } BOOL WINAPI unhook() { return UnhookWindowsHookEx(hook); } 怎么吃不掉这个消息呢??? 高手指点一下.... 这功能怎么实现... |
|
[求助]如何挂勾外部程序的WM_CLOSE消息? 使之不被此消息关闭
自己又挂死机了...闷... |
|
为PE文件增加新节,并在新节中增入SHELL CODE加载指定DLL
工程Project - 设置Setting - c/c++- Optimzations: 选择Default 即可 --------------------Configuration: add_section - Win32 Release-------------------- Linking... add_section.exe - 0 error(s), 0 warning(s) |
|
[求助]如何才能给vb6的text控件加个背景图片?
Good ! ~ |
|
[求助]关于vc++6.0编译器的小问题
谢谢 的确是编译模式问题 |
|
[求助]哪位大侠帮忙看看指点一下。
哇哦~~~ ............................. |
|
[求助]初学C++ 不知道怎么给WIN32 DLL添加版权信息
谢谢楼上的朋友哦....~~~太感谢了... |
|
[求助]关于vc++6.0编译器的小问题
嘿嘿...好像是. 管他呢...能编译就行了...谢谢 |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值