buttonpro(1) assigns not the functions itself (resp a pointer to the function) but its return value.

Code:
pan_setbutton(gp[0],0,1,	10,10,gb[1],gb[2],gb[3],NULL,buttonpro,NULL,NULL);



You can only use it without the bracket and you cannot pass any arguments to the function urself.
Anyway the button functions gets - the number of the button in the panel - automatically passed as first argument and this might be waht u need/want


I <3 LINQ