Before you begin, make sure that the compass control class is registered in the Class Wizard database. In a dialog, inset a picture control. Create a member variable using the Class Wizard Dialog. Make sure that the category is Control and that Variable Type is CCompass. Return Value Returns the previous heading.
Any values are valid.
If the position is less than 0 or greater than 360, then compass will reflect their reference angles. Remarks Use the SetPos method to set the compass heading. Normal compass headings range form 0 to 360 degrees. Other values greater than 360 or less than 0 degrees may be used. The compass control will reflect the reference angle.