With this i can get the number of buttons in the Task-Toolbar
In Win2k (here in Work) is not same than WinXP (in home). In fact, is different if you have the QuickIcons (is another Toolbar)
VB Code:
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, _ ByVal lpsz1 As String, ByVal lpsz2 As String) As Long Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _ (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal _ hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long Private Const WM_USER = &H400 Private Const TB_BUTTONCOUNT = (WM_USER + 24) Private Sub Form_Load() twnd = FindWindow("Shell_TrayWnd", vbNullString) twnd = FindWindowEx(twnd, 0&, "ReBarWindow32", vbNullString) twnd = FindWindowEx(twnd, 0&, "MsTaskSwWClass", vbNullString) twnd = FindWindowEx(twnd, 0&, "ToolbarWindow32", vbNullString) MsgBox "Buttons : " & SendMessage(twnd, TB_BUTTONCOUNT, 0&, 0&) End Sub
That is for another stuff, because is not related to the Task-Toolbar. Is related only to the Shell_TrayWnd
VB Code:
bWnd = FindWindowEx(tWnd, bWnd, "BUTTON", vbNullString)
Please, if somebody wants to help then give some REAL samples![]()
As i say, i can get the Task-Toolbar, the number of Buttons and the Text of every Button (with AA). I'm just want to get the Hwnd's or some identifier to i can know what button is for what window




Reply With Quote