GRID32.OCX, in a CView, and EventSink Maps
Geoffrey Nicholls -- geoff@gazelle.com Thursday, April 18, 1996 WIN NT 3.51 sp 3 VC++ 4.1 I have an application, built by app wizard, that is an ocx container. I went into the component gallery and added the GRID32.OCX control, which created the wrapper files font.cpp/.h, picture.cpp/.h and most importantly gridctrl.cpp/.h. I added the control to CMyView and called Create() accordingly. I am able to make calls to the member functions and access the properties, but when it comes time to put in my event sink map, I have hit a dead end. When I go to app wizard it doesn't recognize the classes in the wrapper files. I tried adding the class by file, and it fails. I tried adding the class by typelib, but there is no GRID*.TLB or GRID*.OLB on the release disks. I don't know the correct parameters for the events, so how am I supposed to manually put an event handler in my CMyView class? Thanks, Geoff Nicholls
ToddAnderson -- andersto@NetHeaven.com Tuesday, April 23, 1996 I have a similar application. You said you added the control then called create, I think I did it a little differently. Let me tell you what I did. Forgive me if you have already tried this. I created an application with a CFormView, went into the dialog editor and added the grid control from the Gallary. This added the files you mentioned and it added a button to the dialog editor toolbar. I then added the grid to the CFormView resource using the dialog editor. I made the grid size 2x2, my application sizes the grid as necessary. I named the Grid ID_GRID and went into class wizard. At this point I could add events and members. I created a member from the control and let MFC create the object. In InitialUpdate I size the grid as needed. Using this method I've had been able to use the grid32 ocx. > >WIN NT 3.51 sp 3 >VC++ 4.1 > >I have an application, built by app wizard, that is an ocx container. I went >into the component gallery and added the GRID32.OCX control, which created >the wrapper files font.cpp/.h, picture.cpp/.h and most importantly >gridctrl.cpp/.h. I added the control to CMyView and called Create() >accordingly. I am able to make calls to the member functions and access the >properties, but when it comes time to put in my event sink map, I have hit a >dead end. When I go to app wizard it doesn't recognize the classes in the >wrapper files. I tried adding the class by file, and it fails. I tried >adding the class by typelib, but there is no GRID*.TLB or GRID*.OLB on the >release disks. I don't know the correct parameters for the events, so how am >I supposed to manually put an event handler in my CMyView class? > >Thanks, >Geoff Nicholls > >
| Вернуться в корень Архива |