Sylvain Gagnon
May 4th, 1999, 08:07 AM
Hi,
I'm trying to drag data from the MSFlexGrid (Active X component) window of my MFC application into EXCEL,
but i'm having problems. I'm using the Visual C++ V5.0 compiler.
1) Creating and filling the MSFlexGrid component is easy since you only need to drop the MSFlexGrid control into
your dialog and add the data by calling appropriate methods in your program.
2) To start dragging, you need to call OLEStartDrag when you click on a mouse button, and then the
event OLEStartDrag is called with the DataSource component as the first parameter (actually it is the
IDispatch interface of the DataSource component).
3)Now you want to load the data into the DataSource component with the ClearData and SetData methods but
this doesn't work as the documentation tells you that you cannot use these methods within the OLEStartDrag
event ? WHY!!!
4)Then you think of loading the data into the DataSource component before clicking the mouse button but
i did not find any methods in the MSFlexGrid component that will return me a pointer to the DataSource
component. Also the DataSource component is not (and will not) registered in the registry.
Anyone got an idea (or any good ActiveX links) ?
Thanks,
Sylvain
I'm trying to drag data from the MSFlexGrid (Active X component) window of my MFC application into EXCEL,
but i'm having problems. I'm using the Visual C++ V5.0 compiler.
1) Creating and filling the MSFlexGrid component is easy since you only need to drop the MSFlexGrid control into
your dialog and add the data by calling appropriate methods in your program.
2) To start dragging, you need to call OLEStartDrag when you click on a mouse button, and then the
event OLEStartDrag is called with the DataSource component as the first parameter (actually it is the
IDispatch interface of the DataSource component).
3)Now you want to load the data into the DataSource component with the ClearData and SetData methods but
this doesn't work as the documentation tells you that you cannot use these methods within the OLEStartDrag
event ? WHY!!!
4)Then you think of loading the data into the DataSource component before clicking the mouse button but
i did not find any methods in the MSFlexGrid component that will return me a pointer to the DataSource
component. Also the DataSource component is not (and will not) registered in the registry.
Anyone got an idea (or any good ActiveX links) ?
Thanks,
Sylvain