For detecting mouse clicks on buttons, the button must be inside the panel area. You didn't give a panel area (size_x/size_y), so the size of your background bitmap is used by default. Can this be the reason for your problem?

Using panel buttons is described in one of the first lite-C workshops.