|
-
May 15th, 1999, 04:03 PM
#1
FlexGrid.AddItem
Hi,
Trying to port a VB program to VC++. I'm using a Flexgrid and the AddItem method takes two param's. In VB the second param was optional and I didn't use it. In VC++ that doesn't seem to be the case. It takes a 'tagVARIANT'type to a index.
Could someone show me how to load this param and how to set it up? I'm really losted on this.
Thanks
Steve P.
-
May 15th, 1999, 09:37 PM
#2
Re: FlexGrid.AddItem
Welcome to VC!!
I did developed an application with VB before but I am porting
to VC cuz VB didn't allow me and sometimes harder to customize its ctrls and many other stuff. But as U expect U have to do a lot more for Ur self where some functionalities were taken for granted in VB.
Anyway, what U could need to do is U need to declare a variable type VARIANT and set its type. In Ur case, set type to LONG cuz second param is msflexgrid row value.
Here is a little declaration:
VARIANT row;
row.vt=VT_I4
row.lVal = someRowValue;
m_flexgrid.AddItem(UrString, row);
There U are!! But I am not saying my way is optimum.
CHECK VARIANT STRUCTURE AND COLEVARIANT CLASS FOR FURTHER INFORMATION!!
Hope for help and good luck to U. 
Walter
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
|
Click Here to Expand Forum to Full Width
|