If you import a type library using #import directive, you will find it in the .tlh or .tli file under the Debug or Release directory.
Another way is to use the OLE/COM Object viewer:
- Use the menu Tools->Ole/COM Object viewer to open the viewer
- Expand the "Type Libraries" node
- Scroll down and locate the control you want. For example "Microsoft FlexGrid Control 6.0..."
- Double-click the item you found
- The ITypleLib Viewer should now display the details
- Now locate for the dispinterface for the events. For example "dispinterface DMSFlexGridEvents" and expand at the 'methods' node
- Then click on the event you want. For example "MouseDown". The value you want would be 0xfffffda3.
The prototype for the MouseDown event handler is defined as: void MouseDown(short Button, short Shift, OLE_XPOS_PIXELS x, OLE_YPOS_PIXELS y);
... so you would have to check the value of Button to see if its left, right or middle button.
Your article spares me from a lot of trouble, it's just great.
But what I have to do is dragging a line somewhere into the same grid. The problem is that OLEStartDrag is not trigerred if the source of data is within the same control. Can you help me please ?
Sorry for the late reply...
It is in fact triggered. Just make sure OLEDropMode property to Manual (1). In the sample app, Targets 1 and 2 (the two grids below) behaves just like you want. You can drag an item with the same control.
I copied your code into my project and can't get it to work. I did it slightly different. I built a multiple document app and just created the dialog from my CDocument. Onstartdrag gets called but ondragover never gets called. I have tried everything. Please help...