in
CPoint Pt;
...
pDC->PolyBezier(&Pt, 20);
you are telling PolyBezier that you are passing an array of 20 POINT structures, but you actually have only a single one allocated and filled in Pt.
Also:
- ScreenY/YMeter are never used. So are OffsetX/Y.
- If your logic for coordinate calculation works can not be seen from the code. Just check it with your debugger.
- Make your life easier by using SaveDC / RestoreDC instead of saving / restoring all settings by hand. That way you are probably not going to forget one.