by 7 » 2006年5月13日(土) 19:32
> 説明不足すみません。
説明不足過ぎですね( ̄□ ̄;)
リストボックスに項目を追加するには LB_ADDSTRING をリストボックスに送信してやります。
コード: 全て選択
Function EnumWndProc(ByVal hWnd As HWND,ByVal lParam As LPARAM) As BOOL
Dim wndName As BytePtr ' ウィンドウ名を持つ
Dim length As Long ' NULLを含むウィンドウ名の長さを持つ
length=GetWindowTextLength(hWnd)+1
wndName=calloc(length)
If GetWindowTextLength(hWnd,wndName,length) Then
SendMessage(GetDlgItem(hMainWnd,ListBox1),LB_ADDSTRING,NULL,wndName)
End If
free(wndName)
EnumWndProc=TRUE
End Function
> 説明不足すみません。
説明不足過ぎですね( ̄□ ̄;)
リストボックスに項目を追加するには LB_ADDSTRING をリストボックスに送信してやります。
[code]Function EnumWndProc(ByVal hWnd As HWND,ByVal lParam As LPARAM) As BOOL
Dim wndName As BytePtr ' ウィンドウ名を持つ
Dim length As Long ' NULLを含むウィンドウ名の長さを持つ
length=GetWindowTextLength(hWnd)+1
wndName=calloc(length)
If GetWindowTextLength(hWnd,wndName,length) Then
SendMessage(GetDlgItem(hMainWnd,ListBox1),LB_ADDSTRING,NULL,wndName)
End If
free(wndName)
EnumWndProc=TRUE
End Function[/code]