According to msdn:
Code:
lResult = SendMessage(           // returns LRESULT in lResult
        (HWND) hWndControl,              // handle to destination control
        (UINT) TB_PRESSBUTTON,           // message ID
        (WPARAM) wParam,                 // = (WPARAM) (int) idButton
        (LPARAM) lParam                  // = (LPARAM) MAKELONG (fPress, 0)
        );
A good macro for MAKELONG is here.
Good luck