Sorry, my question wasn't clear enough. I want the pixel coordinates of a mouse click, GetPixel gives the colour at the specified coordinates.
Yes, this is what I have already implemented to get the mouse event, that's not the problem, what I can't get are the pixel coordinates.
The MOUSE_EVENT_RECORD gives you the mouse position in character-cell coordinates.
Maybe get the width of the console window in pixels and divide by number of characters.
Consider to create a normal Windows app for this.
The console is not meant for this and everything is far more complicated.
Indeed that's what I ended up doing. It does seem strange that the API supports writing at pixel resolution but not reading. Oh well.