Did you try what I said above?
Before doing CNC_GetParameter, do this:
LPPOS pPos = (LPPOS)&rdPtr->rHo.hoCurrentParam->evp.evpW.evpW0;
If the user chose "Actual coordinates", then posOINUMParent = -1 and posLayer gives you the index of the layer selected in the drop down list.
Code:
if (pPos->posOINUMParent == -1)
{
// Actual coordinates
layer = pPos->posLayer;
}
else
{
// Relative to
// This case is more complex to handle as it depends on object selection AND if you are in a condition, action or expression...
}
I suggest that if you want a layer information in all cases you forget PARAM_POSITION and use your own X, Y and Layer parameters.