ActiveX control - Hdc/CDC etc..
Posted on 2001-08-03
I'm currently writing an ActiveX control which will respond to various methods by drawing on the screen.
As there could potentially be thousands of methods run on one control, I don't want to draw directly onto the window.
What I'd like to do is create a compatible bitmap when the control is first displayed, then all my methods will draw to this CDC, rather than the main one for the form.
After calling all my methods, I then want to just bitblt the control onto the main window from the DC held in memory.
I've been trying to do this for the past day, but still haven't solved it. My code is as follows in the ondraw event...
CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid)
Can someone please tell me what I'm doing wrong ??