Re: ATL Control in VB
From: Alexander Nickolov (agnickolov_at_mvps.org)
Date: 04/24/04
- Next message: Alexander Nickolov: "Re: problem assigning double as defaultvalue"
- Previous message: Alexander Nickolov: "Re: ActiveX events & non-Dialog window"
- In reply to: Richard Boehme: "Re: ATL Control in VB"
- Next in thread: Alexander Nickolov: "Re: ATL Control in VB"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 23 Apr 2004 23:14:20 -0700
ActiveX Controls have to be hosted on a form (e.g. dialog)
by design. Some controls may be designed to act as plain
Automation servcers as well (most aren't). These typically
are not real control, just packaged as controls for the
convenience of VB developers. Some are the result of poor
design spec on the part of their developers (or managers)...
In short, when you hear control, that means it is to be hosted
on a form.
-- ===================================== Alexander Nickolov Microsoft MVP [VC], MCSD email: agnickolov@mvps.org MVP VC FAQ: http://www.mvps.org/vcfaq ===================================== "Richard Boehme" <boehme@newsgroups.nospam> wrote in message news:uG3OcuTKEHA.3436@tk2msftngp13.phx.gbl... > The dialog is not modal, but what would be the problem if it was? Also, > I am now declaring my contro like this: > > Dim WithEvents emVideoPlayer As CEMVideoCtl > > in VB, but this seems to make statement like this: > > With emVideoPlayer > .Width = Me.ScaleWidth - (25) > .Height = Me.ScaleHeight - (147) > End With > > not work at all. Are there any strange quirks to having the control on > the form and also declaring it as WithEvents that I'm missing? > > Also, the link to where it says the event interfaces should be dual is here: > > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcconeventhandlingincom.asp > > which is referenced from the "Adding an Event Using Attributes" section > of "Creating an ActiveX Control" here: > > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcconeventhandlingincom.asp > > Thanks for the help! > > Richard Boehme > > Alexander Nickolov wrote: > > > Ensure you are not displaying a modal dialog in the VB debugger. > > Do you pay attention to the event freeze flag (m_nFreezeEvents)? > > It must be zero, otherwise your events likely will be dropped by > > your container. > >
- Next message: Alexander Nickolov: "Re: problem assigning double as defaultvalue"
- Previous message: Alexander Nickolov: "Re: ActiveX events & non-Dialog window"
- In reply to: Richard Boehme: "Re: ATL Control in VB"
- Next in thread: Alexander Nickolov: "Re: ATL Control in VB"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|