How would I find a button on the nickList of IRC? or find a button on AIM and press it (using SendMessage())

I know how to use FindWindow to find hWnd using classname or caption of lets say notepad, but after I have hwnd I dont know what to do, also on AIM, the classname for some things are not strings, they are like "#000000 (dialog)" and hWnd has letters (hex I guess, using spy++)