ActiveX MFC design tour-Step 2

Source: Internet
Author: User
I'm dizzy, because I didn't write a summary, and I didn't want to delete all the sections I wrote. This Blog is also a great dish.
Ah, I have to try again.

Where did we go from the previous step? Oh, by the way, we need to be able to list the properties of the LiteGrid Cell object during VB editing.
First, why can't we leave it out? That's because the returned type of our Cell attribute is LPDISPATCH, that is, IDispatch *. IDispatch is a common interface and seems to have no Text or other attributes.
So it's easy to change LPDISPATCH to ICell *.

1. Open the LiteGrid. odl file and change the return type lpdispatch of the Cell attribute to ICell *
Is it okay? compile it and check whether it works. I don't know ICell *. I think most of my friends know the reason. Just define the ICell interface in advance.
2. annotate the statement
// Primary dispatch interface for CCell
Definition pulling of the starting ICell Interface
// Primary dispatch interface for CLiteGridCtrl
Front.
Compile and check.
3. in VB, try to write LiteGrid1.Cell (0, 0 ). is the Cell Object attribute listed? Although there is only one (there is only one), after writing it, run it. OK

It's easy. Well, this is just a small step. Next we will turn to the next page and move the step to the attribute page, but it's time for the next article.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.