请问,如和判断字符串数组
请教,如和判断字符串数组
诚心请教各位大虾,
------解决方案--------------------
function EnumChildWndProc(AhWnd: LongInt; AlParam: lParam): boolean; stdcall;
var
WndClassName: string;
WndCaption: string;
begin
SetLength(WndClassName, 256);
GetClassName(AhWnd, PChar(WndClassName), Length(WndClassName));
WndClassName := StrPas(PChar(WndClassName));
SetLength(WndCaption, 256);
GetWindowText(AhWnd, PChar(WndCaption), Length(WndCaption));
WndCaption := StrPas(PChar(WndCaption));
// 比较字符串总会吧
//...
result := true;
end;
诚心请教各位大虾,
function EnumChildWndProc(AhWnd:LongInt;
AlParam:lParam):boolean;stdcall;
var
WndClassName: array[0..254] of Char;
WndCaption: array[0..254] of Char;
begin
GetClassName(AhWnd,wndClassName,254);
GetWindowText(aHwnd,WndCaption,254);
//请问在这里如何判断类名为,假如是ComboBox类的
with form1.memo1 do
begin
.........
end;
result:=true;
end;
------解决方案--------------------
function EnumChildWndProc(AhWnd: LongInt; AlParam: lParam): boolean; stdcall;
var
WndClassName: string;
WndCaption: string;
begin
SetLength(WndClassName, 256);
GetClassName(AhWnd, PChar(WndClassName), Length(WndClassName));
WndClassName := StrPas(PChar(WndClassName));
SetLength(WndCaption, 256);
GetWindowText(AhWnd, PChar(WndCaption), Length(WndCaption));
WndCaption := StrPas(PChar(WndCaption));
// 比较字符串总会吧
//...
result := true;
end;