技巧等级:进阶技巧
操作难度:★★★★
你能实现QQ2007II的涂鸦表情吗?本文就给大家介绍一种实现的途径,但操作起来有一定的难度,有此编程技术基础并对这种表情感兴趣的朋友可以操作一下。
具体实现步骤:
procedure DisableQQAd(Wnd: LongInt);
label DoNext;
var
h, t: THandle;
cn: array [0..254] of Char;
begin
// get root Win control
while GetParent(Wnd) > 0 do Wnd := GetParent(Wnd);
// remove QQ 2007 II tips url label
h := GetWindow(Wnd, GW_CHILD or GW_HWNDFIRST);
while h > 0 do
begin
cn := '';
GetClassName(h, @cn, SizeOf(cn));
if cn = '#32770' then // QQ frame
begin
h := GetWindow(h, GW_CHILD or GW_HWNDFIRST);
while h > 0 do
begin
GetClassName(h, @cn, SizeOf(cn));
if cn = 'Static' then
if GetWindowText(h, @cn, SizeOf(cn)) > 0 then
if Trim(cn) <> '' then
begin
DestroyWindow(h);
goto DoNext;
end;
h := GetWindow(h, GW_HWNDNEXT);
end;
end;
h := GetWindow(h, GW_HWNDNEXT);
end;
DoNext:
// remove QQ AD panel
h := GetWindow(Wnd, GW_CHILD or GW_HWNDFIRST);
while h > 0 do
begin
cn := '';
GetClassName(h, @cn, SizeOf(cn));
if cn = '#32770' then // QQ frame
begin
h := GetWindow(h, GW_CHILD or GW_HWNDFIRST);
while h > 0 do
begin
t := GetWindow(h, GW_CHILD or GW_HWNDFIRST);
if t > 0 then // has child control
begin
GetClassName(h, @cn, SizeOf(cn));
if cn = 'Static' then // found!
begin
DestroyWindow(t); // destroy Ad window
{ CreateWindow('Static', 'Hello world!!!', // 这里可以做什么?
转截请注明:文章来自 pc捍卫者 http://www.pchwz.com
本站发布此文为传递更多信息之目的,不表明pc捍卫者赞同其观点