If I have created a custom collection class which encapsulates a standard Collection object, how then can I enumerate its members by using For Each?
e.g.
VB Code:
Dim objWindow As CWindow ' Custom class Dim objWindows As CWindows ' Custom collection class objWindows.GetWindows ' Populate the collection ' Now how can I provide support for this: For Each objWindow In objWindows ' .... Next objWindow
I think it works with a NewEnum method or something, but they are all hidden. Any ideas?




Reply With Quote