I have an app with a floating / docking toolbar. This is a pretty big program. Recently I've added a new function that comes off of the toolbar. This involves some screen draws and screen captures. However, when I do a

pDC = GetDC();

and then

pDC->MoveTo(p1.x, p1.y);
pDC->LineTo(p2.x, p2.y);

the drawing is off, on the Y axis by the height of the toolbar! In other words, the offset of the toolbar to the screen is not being calculated. This is only happening in the 'new function'.

Anybody have any ideas (other than adding 60 to the Y of every call)?

Thanks!