Hi,
I've been trying to make an equivalent Mac OS X function as alternatives to the ScreenToClient() and ClientToScreen() Windows API functions and am finding it extremely hard picking up the language. Basically what I would like to do is to get the absolute screen co-ordinates of a point when I pass a position within a panel, and vice-verse (i.e. get the relative position of a absolute screen point from a specific panel).
I've currently got the following...
Working Code At Bottom of Thread
However as soon as it calls the external function, the program crashes... The code is taken from some sample code around the web where it apparently works.
Many thanks for all your help,
Seb
I've been trying to make an equivalent Mac OS X function as alternatives to the ScreenToClient() and ClientToScreen() Windows API functions and am finding it extremely hard picking up the language. Basically what I would like to do is to get the absolute screen co-ordinates of a point when I pass a position within a panel, and vice-verse (i.e. get the relative position of a absolute screen point from a specific panel).
I've currently got the following...
Working Code At Bottom of Thread
However as soon as it calls the external function, the program crashes... The code is taken from some sample code around the web where it apparently works.
Many thanks for all your help,
Seb