Hi,

I derived a class from CWnd, and am owner-drawing it. I wanted it to be

flicker free, so I used CMemDC
(http://www.codeproject.com/gdi/flickerfree.asp). Once I went and
applied
the WS_EX_LAYOUTRTL style to my dialog (with NoInherit set to false) or

directly to the CWnd-derived class of my control it was just greyed out
and
didn't show anything, although I was drawing within it.

[ Technical details: ]
I've investigated it a bit, and it seems that either the issue is with
CMemDC, or it is with the drawing made to it. If I replace the line
CMemDC
pDC(&dc); with CDC* pDC(&dc); (within OnPaint) after I have applied the

WS_EX_LAYOUTRTL to it, it will mirror just fine, but will still
flicker. If
I will keep with the original, CMemDC line, it is, as I said, greyed
out -
the drawing is not made to the correct rectangle. If I add this line:
dc.SetLayout(WS_EX_LAYOUTRTL); BEFORE creating the CMemDC instance, it
will
draw in the correct rectangle, but will not mirror or buffer the
output.
If I comment the calls to pDC->LPtoDP and pDC->DPtoLP within the CMemDC

class it mirrors just fine, but again with flickers (and I need to
remove
the line which sets WS_EX_LAYOUTRTL to the dc from OnPaint).
[ End of technical details ]

I looked around and found this MS article on mirroring:
http://www.microsoft.com/globaldev/g...RG_mirror.mspx. I don't

think I need to use any client-screen conversion - the issue seems to
be
with the LPtoDP and DPtoLP calls, as desribed above.

Can you please advise on how to solve this? I think I'm missing
something
concerns the LayoutRTL style; maybe something with the behaviour of the
DC?
Also, if there is another way to achieve flicker-free drawing that
would not
fail with RTL layouts, I'm listening.

Thanks in advance,

Stilgar.