Re: Child window vs ActiveX drawing
- From: "Alexander Nickolov" <agnickolov@xxxxxxxx>
- Date: Mon, 17 Oct 2005 17:14:22 -0700
Ah, I see, I was reading something else in your post - an
ActiveX Control with children. Sure, you'll get the same
performance if you are drawing directly, where can the
difference come from anyway, since you are not using any
protocol to your container? I guess you are using windows
for conveniently clipping the DD output. With ActiveX
Controls you have to make sure they are always activated
windowed in that case. By default ATL creates windowless
controls, hence no window to clip on. E.g. in your constructor
add: m_bWindowOnly = TRUE;
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@xxxxxxxx
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================
"Bogdan" <someone@xxxxxxxxxx> wrote in message
news:O8kSpq00FHA.3892@xxxxxxxxxxxxxxxxxxxxxxx
> Alexander, thanks for the info. So, as far as you know, there are no
> issues
> (performance or otherwise) with DD drawing in ActiveX controls?
>
> In regards to child windows... I feel quite comfortable working with DD
> (full-screen or windowed) in stand-alone apps. As I mentioned in my
> original post, I have only a limited experience with ActiveX - definitely
> nothing to do with animation or graphics extensive stuff. I'm simply not
> sure if ActiveX controls introduce any overhead (as compared to child
> windows). To back it up with an example, let's say that my app's window
> contains four 100x100 pixels rectangular widgets. Each widget draws
> frames
> at ~20 times per second (frame drawing triggered by a a timer message).
> Can
> I safely assume that ActiveX will perform as well as child windows in this
> case?
>
> Again, I'd appreciate any comments.
> Thanks,
> Bogdan
>
>
> "Alexander Nickolov" <agnickolov@xxxxxxxx> wrote in message
> news:OLBmjsz0FHA.3256@xxxxxxxxxxxxxxxxxxxxxxx
>> Obviously, DirectDraw is the most efficient method. GDI+
>> is unfortiunately not hardware accelerated. GDI we all know
>> and hate.
>>
>> When drawing in an ActiveX Control directly, you should
>> be aware that your control can be drawn for non-screen
>> purposes (where DirectX is not applicable). E.g. for image
>> caching by containers, for printing, and for inactive drawing
>> (for example VC's resource editor never activates its controls).
>> You'll need a separate drawing code for these purposes, one
>> which won't persent any animation, and instead draw some
>> static images showing the layout of your control for example.
>>
>> I fail to see why would you want child windows in the first
>> place, however. It seems rectangles within your control's
>> rectange for where to draw the output of your widgets is
>> all you need.
>>
>> --
>> =====================================
>> Alexander Nickolov
>> Microsoft MVP [VC], MCSD
>> email: agnickolov@xxxxxxxx
>> MVP VC FAQ: http://www.mvps.org/vcfaq
>> =====================================
>>
>> "Bogdan" <someone@xxxxxxxxxx> wrote in message
>> news:eUHr4Sz0FHA.2064@xxxxxxxxxxxxxxxxxxxxxxx
>> > Hi,
>> >
>> > Could anyone please tell me if there is any difference (efficiency
>> > wise)
>> > between drawing in a 'regular' child window and drawing in an ActiveX
>> > control? I'm about to start working on an app whose main view (window)
>> > will
>> > consist of a bunch of animation widgets. The widgets will draw text
>> > and
>> > images at given frequencies - timer or thread driven. Users will be
> able
>> > to
>> > run the app in two modes: 1) edit (drop, size, move, etc. widgets) 2)
>> > play.
>> > My dilemma is that I'm not sure if I should create the widgets as child
>> > windows or ActiveX controls. I'd like child windows simplicity from
>> > the
>> > programming and installation point of views (e.g. no registration). On
>> > the
>> > other hand, ActiveX controls seem to have a lot of stuff built-in that
>> > I'll
>> > need in the 'edit' mode. Still, the most important thing is the
>> > widgets
>> > performance in the 'play' mode. I have a limited past experience with
>> > ActiveX. Most of the development that I've done in the last few years
> has
>> > been in MFC.
>> >
>> > The widgets performance related areas that I'm most interested in are:
>> > 1. Drawing using DirectDraw
>> > 2. Drawing using GDI
>> > 3. Drawing using GDI+
>> > 4. Using timer
>> > 5. Having different widgets using different drawing methods (i.e. some
> of
>> > them using DD, other GDI, GDI+ - one widget limited to a single
>> > method).
>> >
>> > I'd appreciate any suggestions and/or pointers.
>> >
>> > Thanks,
>> > Dan
>> >
>> >
>> >
>>
>>
>
>
.
- References:
- Child window vs ActiveX drawing
- From: Bogdan
- Re: Child window vs ActiveX drawing
- From: Alexander Nickolov
- Re: Child window vs ActiveX drawing
- From: Bogdan
- Child window vs ActiveX drawing
- Prev by Date: Re: gettting out parameters from the Invoke Function
- Next by Date: Re: Using MTA COM+ Objects in ASP Pages
- Previous by thread: Re: Child window vs ActiveX drawing
- Next by thread: ProxyStub, in-proc
- Index(es):
Relevant Pages
|
Loading