Re: Paint problem in dialog

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Brad (brad_at_blargNospamPlease.net)
Date: 06/18/04


Date: Fri, 18 Jun 2004 17:08:11 -0000


> OK, I think I see now. When "ourDC" is false, the DC is for the parent
> window. In that case, you need to convert from child window client
> coordinates to parent window client coordinates. On the other hand, when
> "ourDC" is true, you don't need to perform this conversion, as the DC is for
> the child window. If that's correct, then ignore what I said earlier about
> "ourDC".

Righto.

>>>Still don't understand why this doesn't work for the
>>>OnPaint()-called case.
>
> The OnPaint case is the parent window's OnPaint, right? If so, I'd guess
> you're not keeping your coordinates consistent, or maybe the parent has the
> WS_CLIPCHILDREN style. In any event, I don't think trying to salvage this
> approach is a good use of your time. :)

I was starting to wonder if it was a clipping issue. Anyway, I'm
on my way to the "correct" solution....

Thanks again,
Brad



Relevant Pages