Please post the code.
Btw: do you have mouse_mode set to something bigger than zero (e.g. 2) ?
And you do have a mouse_map and a function which handles the mouse_pos.x/y ?
I mean otherwise you couldn't click on it