色婷婷狠狠18禁久久YY,CHINESE性内射高清国产,国产女人18毛片水真多1,国产AV在线观看

vb6或E語言怎么取一個窗口或控件的子窗口或子控件的句柄?

錢琪琛2年前12瀏覽0評論

這個可能是你想要的東東吧?。剑剑剑剑剑剑剑剑剑剑剑剑剑剑剑剑剑剑剑剑剑剑剑剑絍B遍歷窗口所有子窗體句柄PrivateConstGW_CHILD=5PrivateConstGW_HWNDFIRST=0PrivateConstGW_HWNDNEXT=2PrivateDeclareFunctionGetWindowTextLib"user32"Alias"GetWindowTextA"(ByValhwndAsLong,ByVallpStringAsString,ByValcchAsLong)AsLongPrivateDeclareFunctionGetWindowTextLengthLib"user32"Alias"GetWindowTextLengthA"(ByValhwndAsLong)AsLongPrivateDeclareFunctionIsWindowLib"user32"(ByValhwndAsLong)AsLongPrivateDeclareFunctionGetClassNameLib"user32"Alias"GetClassNameA"(ByValhwndAsLong,ByVallpClassNameAsString,ByValnMaxCountAsLong)AsLongPrivateDeclareFunctionGetWindowLib"user32"(ByValhwndAsLong,ByValwCmdAsLong)AsLongPrivateSubFillChild(hWndParentAsLong)DimhWndChildAsLongDimszCaptionAsStringDimbufferAsStringDimiAsLonghWndChild=GetWindow(hWndParent,GW_CHILD)If(hWndChild=0)ThenExitSubhWndChild=GetWindow(hWndChild,GW_HWNDFIRST)IfhWndChild=0ThenExitSubWhile(hWndChild<>0)szCaption=String$(255,0)GetClassNamehWndChild,szCaption,250szCaption=Left$(szCaption,InStr(szCaption,String$(1,0))-1)buffer=CStr(hWndChild)&"--"&szCaptioni=GetWindowTextLength(hWndChild)szCaption=String$(255,0)GetWindowTexthWndChild,szCaption,250szCaption=Left$(szCaption,i)buffer=buffer&"--"&szCaptionList1.AddItembufferFillChildhWndChildhWndChild=GetWindow(hWndChild,GW_HWNDNEXT)WendEndSubPrivateSubGetChildWindow(hwndAsLong)DimszCaptionAsStringDimbufferAsStringDimiAsLongList1.ClearszCaption=String$(255,0)GetClassNamehwnd,szCaption,250szCaption=Left$(szCaption,InStr(szCaption,String$(1,0))-1)buffer=CStr(hwnd)buffer=buffer&"--"&szCaptioni=GetWindowTextLength(hwnd)szCaption=String$(255,0)GetWindowTexthwnd,szCaption,250szCaption=Left$(szCaption,i)buffer=buffer&"--"&szCaptionList1.AddItembufferFillChildhwndEndSub調用方法GetChildWindowhwnd'hwnd是指定的窗口句柄結果以窗體句柄--窗體類名稱--窗體Text形式列在列表框List1中