|
-
Active X Control as Container
I have an ActiveX control that is a container for other controls. I would
like to subclass to the children controls and capture certain windows messages.
I step through the Controls collection and try to obtain the HWND for each
child control in the ActiveX control. The ListView and TreeView do not seem
to have HWND's when in development. I get a "Write Only" error when I try
to read the Hwnd. Have you ever seen this problem,and is there another way
of getting the HWNDs.
Thanks is advance for any help
-
Re: Active X Control as Container
"Anthony Lucidi" <alucidi@estee.com> wrote:
>
>I have an ActiveX control that is a container for other controls. I would
>like to subclass to the children controls and capture certain windows messages.
> I step through the Controls collection and try to obtain the HWND for each
>child control in the ActiveX control. The ListView and TreeView do not
seem
>to have HWND's when in development. I get a "Write Only" error when I try
>to read the Hwnd. Have you ever seen this problem,and is there another
way
>of getting the HWNDs.
>
>Thanks is advance for any help
It has an HWND, you just can't get it through the properties.
You'll need to use API techniques (EnumWindows, GetWindow, etc.) to get the
handles.
Check out examples in my "Visual Basic Programmer's Guide to the Win32 API".
Also, if you're
using SpyWorks for the subclassing, you'll find examples of API based techniques
there (and
have access to Desaware's tech support if you run into trouble).
Dan
-
Re: Active X Control as Container
> I have an ActiveX control that is a container for other controls.
> I would like to subclass to the children controls and capture
> certain windows messages. I step through the Controls collec-
> tion and try to obtain the hWnd for each child control.
Anthony: Have you tried the UserControl's .ContainedControls collection?
---
Phil Weber
-
Re: Active X Control as Container
"Phil Weber" <pweber@teleport.com> wrote:
> > I have an ActiveX control that is a container for other controls.
> > I would like to subclass to the children controls and capture
> > certain windows messages. I step through the Controls collec-
> > tion and try to obtain the hWnd for each child control.
>
>Anthony: Have you tried the UserControl's .ContainedControls collection?
>---
>Phil Weber
>
>
Yes Phil That is how I am getting the controls within the container, but
when I try to get the HWND for the listview or treeview I get the error message
saying the HWND is a write only property and when I try to write to it I
get a message saying the HWND property is Read only..
Similar Threads
-
By SleepyBoBos in forum VB Classic
Replies: 1
Last Post: 08-27-2002, 02:28 AM
-
By Steve Ariel in forum VB Classic
Replies: 0
Last Post: 02-14-2001, 01:47 AM
-
By Mike Hamilton in forum VB Classic
Replies: 4
Last Post: 12-21-2000, 04:41 AM
-
By Mark Alexander Bertenshaw in forum VB Classic
Replies: 6
Last Post: 05-05-2000, 07:10 AM
-
By Mark Alexander Bertenshaw in forum VB Classic
Replies: 0
Last Post: 05-03-2000, 11:13 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks