呵呵,参看MSDN: Pointer to a null-terminated string that specifies the class name or a class atom created by a previous call to the RegisterClass or RegisterClassEx function. The atom must be in the low-order word of lpClassName; the high-order word must be zero. 我想:第一个参数可以是 pointer to class name,也可以是a class atom (一个类原子),估计这里的#32563就是类原子吧。
Pointer to a null-terminated string that specifies the class name or a class atom created by a previous call to the RegisterClass or RegisterClassEx function. The atom must be in the low-order word of lpClassName; the high-order word must be zero.
我想:第一个参数可以是 pointer to class name,也可以是a class atom (一个类原子),估计这里的#32563就是类原子吧。
IpClassName指向了一个指向类名的空结束字符串,或一个标识了类名成员的指针,如果该参数为一个成员,则它必须为前次调用thgGlobafAddatom产生的全局成员,该成员为十六位,必须位于IpClassName的低十六位,高位必须为0
总能找到指定的窗体。如果是写成上面的形式,IpClassName 的具体的值是怎么算出来的?我现在就想知道这个。
#32769(桌面) 类原子 8001
#32770(对话框)类原子 8002这个东东是不变的,没必要细究,你知道他是什么东西就行了
例如,你这样定义一个TForm1 = class(TForm)
end;
TAAA = class(TForm1)
end;最后你用SPY++查看的时候TForm1 类名 TForm1
类原子 C2C2 也就是#49858
TAAA 类名 TAAA
类原子 C0DD 也就是#49373
一般是根据类名来查找的,
如果类名有重复的话,才用类原子的十进制来查找而这个十进制具体是多少,就必须根据某些工具来查看了SPY++是比较好的一个,VC里面有这个工具
那是ClassName,Win32窗口的类名
Windows是这样的,没有为什么的
根据实际的观察,在98和2000下都是同一个窗体
这个进程的ID可由
getwindowsthreadid
得到(天知道是不是又记错了,嘿嘿,反正大概差不太多)