I am trying to incorporate a VB ocx into a VC++ application I am working on. I downloaded an .ocx that someone had written in VB that is essentially a grid where each cell is a combobox. They have a member function called comboAddItem, where the argument to this function is a variant. In VB, you can pass an integer, string of whatever you want to populate the comboboxes. However, if I try to pass an int or a string in VC, I get an error message saying, "Cannot convert int (or string or whatever) to struct tag VARIANT *".
So my question is, what type of structure am I supposed to set up for this variant so I can pass data to this function?? Or more simply, how do variants work??