Re: Child window vs ActiveX drawing



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
>> >
>> >
>> >
>>
>>
>
>


.



Relevant Pages

  • Re: Child window vs ActiveX drawing
    ... with DD drawing in ActiveX controls? ... In regards to child windows... ... sure if ActiveX controls introduce any overhead (as compared to child ... contains four 100x100 pixels rectangular widgets. ...
    (microsoft.public.vc.atl)
  • Re: Trouble with repainting
    ... Windows Forms Tips and Tricks. ... My bitmap will> always be 32bppARGB. ... is there any other way to do drawing in> .NET that will give better performance? ... Double>> buffering only works on a control level so turning on db for the form>> will not make the controls flicker free. ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Improving Control Painting
    ... Find great Windows Forms articles in Windows Forms Tips and Tricks ... > You can try setting the following style's in your controls' constructor ... I've got some performance issuses with the GDI+ drawing of my ... >>Here is my painting code: ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: Unable to download/run ActiveX controls
    ... Problems accessing secure sites/cannot install 128 bit encryption ... Allow active content to run in files on My Computer - Windows XP Service ... > containing ActiveX controls produce the same error message, ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: Basic VB/Access2003 syntax, how to find out about it?
    ... the syntax concisely, I don't seem to be able to find ... The above is simply a refence to the standard windows technologies. ... simply a means by which 3rd party controls can ... In ms-access, you *can* use activeX controls, but you are STRONGLY advised ...
    (comp.databases.ms-access)

Loading