[CONNECT C++] statedata cursor location

Using global struct statedata (defined in header ..\Mstn\MicroStation.r.h) my app. can obtain the current cursor position in a MicroStation view...

DPoint3d  CurrentCursorPosition ()
{
  return statedata.current.dpUors;
}

I notice that as I move the cursor over a non-view window, such as MicroStation's tool settings, the current coordinates are zero.  How can I tell whether the cursor is in a MicroStation view window or in a non-view window?