VB 6.0 from VC++ 6.0, .dlls, pointers, etc
-
Did this easily in VC++, now I'm trying to learn VBasic 6.0... ClassA ClassB - includes pointer to an ordered list of ClassA's ClassC - inherits from ClassB, includes pointer to one ordered list of both ClassA's and ClassB's All classes created and destroyed dynamically, multiple instances On form: Custom ListBoxA - with pointer to list of ClassA's whose member variable "name" determines items in ListBox Custom ListboxB - same as above, but ClassB's Custom ListBoxC - same, but both ClassA and ClassB as items the problem: Drag items from ListBoxes A and B and drop onto ListBox C. Want to create custom dragndrop mousepointers which consist of the text from the listbox being dragged (can I create an icon/cursor on a device context and assign that to the pointer??) VBasic doesn't seem "pointer-friendly." Can I dynamically create a List of ClassA objects, then point to it from one or more of the listboxes?? I'm still new to VB's data types. Is this the kind of thing I would use a Collection class for? One more thing, sorry for being so needy. I want to be able to re-order items within the ListBoxes, by drag n drop, so I need to know exactly where in the listbox the mouse is pointing... ideally which item number as well as which pixel within the item's rectangle. Can I do this in VB 6.0 or is there a better method to this?? Thank you to anyone who has read this far and who responds. Tym! :wtf:
-
Did this easily in VC++, now I'm trying to learn VBasic 6.0... ClassA ClassB - includes pointer to an ordered list of ClassA's ClassC - inherits from ClassB, includes pointer to one ordered list of both ClassA's and ClassB's All classes created and destroyed dynamically, multiple instances On form: Custom ListBoxA - with pointer to list of ClassA's whose member variable "name" determines items in ListBox Custom ListboxB - same as above, but ClassB's Custom ListBoxC - same, but both ClassA and ClassB as items the problem: Drag items from ListBoxes A and B and drop onto ListBox C. Want to create custom dragndrop mousepointers which consist of the text from the listbox being dragged (can I create an icon/cursor on a device context and assign that to the pointer??) VBasic doesn't seem "pointer-friendly." Can I dynamically create a List of ClassA objects, then point to it from one or more of the listboxes?? I'm still new to VB's data types. Is this the kind of thing I would use a Collection class for? One more thing, sorry for being so needy. I want to be able to re-order items within the ListBoxes, by drag n drop, so I need to know exactly where in the listbox the mouse is pointing... ideally which item number as well as which pixel within the item's rectangle. Can I do this in VB 6.0 or is there a better method to this?? Thank you to anyone who has read this far and who responds. Tym! :wtf:
bad news man, VB6 doesn't support pointers as far as I know. I have read an article somewhere in CP that uses API to get pointers in VB6 but I can't seem to find it again. :( On the list reordering, when an item is clicked in the listbox, you can refer to it by:
List1.ListIndex 'this gets the zero based index of the list item OR
List1.List(List1.ListIndex) ' this gets the string value of the selected listNotorious SMC
The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning Mark Twain
Get your facts first, and then you can distort them as much as you please Mark Twain