Re: ActiveX control draws outside of it's window when IE scrolls?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Buddy Smith <BuddySmith@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>> Bad idea, the latter one. Windowing and GDI systems are not
>> thread-safe, windowing is also thread-affine. You should do your
>> painting from the main UI thread. Prepare an off-screen bitmap in a
>> worker thread if you want, but BitBlt it to the screen on the UI
>> thread.
>
> Unfortunately I need to paint whenever a new image is available.

Post yourself a user-defined message. In the UI thread, in response to
this message, grab the DC with GetDC and paint to your heart's content.
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925


.



Relevant Pages

  • Re: CPaintDC class
    ... if I declare "CPaintDC dc" and the ... surface is to be repainted does BitBlt only paint said region? ... Let's say only the rectangle needs ...
    (microsoft.public.vc.language)
  • Re: shape recognition
    ... instead of ANDing each pixel as you ... I was thinking more of using BitBlt to paint the image ...
    (microsoft.public.vb.general.discussion)
  • Re: using CClientDC::BitBlt() to capture only the client window
    ... There are generally 2 types of paint programs, ones that simply draw, like ... to the memory dc with the bitmap selected in it. ... And in the OnPaint method of your view, you would simply bitblt the content ... BitBltto capture the drawing area that is the window of my ...
    (microsoft.public.vc.mfc)
  • Re: Simulate Autoredraw
    ... I personally use the bitblt and it's ligntning ... I would think that an image has to be rendered during each paint ... I was able to figure out to create the graphics from the bitmap, ... and was able to draw to it, ...
    (microsoft.public.dotnet.languages.vb)
  • Re: How to operate the ListCtl in a worker thread.
    ... Use PostMessage of a user-defined message to the main GUI thread and handle ... SendMessage cross-thread! ... >I have two threads, one UI thread, the other, the worker thread, which is ... MVP Tips: http://www.flounder.com/mvp_tips.htm ...
    (microsoft.public.vc.mfc)