Click here to Skip to main content
16,005,682 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralStore the contents of a stucture in a file Pin
swarnamanoo21-Mar-04 19:34
swarnamanoo21-Mar-04 19:34 
GeneralRe: Store the contents of a stucture in a file Pin
RadioShark21-Mar-04 22:04
RadioShark21-Mar-04 22:04 
GeneralRe: Store the contents of a stucture in a file Pin
jhwurmbach21-Mar-04 22:16
jhwurmbach21-Mar-04 22:16 
GeneralRe: Store the contents of a stucture in a file Pin
jhwurmbach21-Mar-04 22:16
jhwurmbach21-Mar-04 22:16 
GeneralShowing a Tabbed Dialog box Pin
Tariq87821-Mar-04 19:30
Tariq87821-Mar-04 19:30 
GeneralRe: Showing a Tabbed Dialog box Pin
Michael P Butler21-Mar-04 21:56
Michael P Butler21-Mar-04 21:56 
GeneralPass Data to form using HTTP.. Pin
rasha200321-Mar-04 18:39
rasha200321-Mar-04 18:39 
GeneralUsing MS Office Spreadsheet ActiveX Control Pin
JonahD21-Mar-04 17:55
JonahD21-Mar-04 17:55 
Hello,

First off, let me say that I'm fairly new to ActiveX controls, so I'm probably missing something obvious, but here's the situation.

I'm trying to use the Microsoft Office Spreadsheet 11.0 control in a dialog application. I've gone through all of the steps to get the class added to my project. I found the control in the Registered ActiveX Controls folder and selected it, I left the default classes selected and it appeared to create all of the wrapper classes without any major hiccups.

The problem comes when I try to compile the program. I get many errors (around 35) which read:

error C2440: 'type cast' : cannot convert from 'struct IDispatch *' to 'class CSpreadsheet'
No constructor could take the source type, or constructor overload resolution was ambiguous


The errors occur in various classes, but invariably the function causing the error has this structure:

CSpreadsheet CXmlMaps::GetApplication()<br />
{<br />
	LPDISPATCH pDispatch;<br />
	InvokeHelper(0x60020004, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&pDispatch, NULL);<br />
	return CSpreadsheet(pDispatch);<br />
}


The problem seems to be calling the CSpreadsheet (one of the wrapper classes created by the ActiveX wizard) constructor, but CSpreadsheet doesn't appear to have any constructors defined. It's derived from CWnd, so I don't think there are any suitable constructors there either. I've been able to successfully use some of the simpler ActiveX controls (such as the Calendar control), but it seems to hang up on this one for some reason. Any insight would be helpful. I hope I've explained it well enough.

Thanks!
JD
GeneralDrawing on a dialog box Pin
monrobot1321-Mar-04 17:45
monrobot1321-Mar-04 17:45 
GeneralApplication (exe) performance Pin
Anonymous21-Mar-04 17:38
Anonymous21-Mar-04 17:38 
GeneralSharing data between dialog Pin
r00k1321-Mar-04 17:08
r00k1321-Mar-04 17:08 
GeneralRe: Sharing data between dialog Pin
Anonymous21-Mar-04 17:41
Anonymous21-Mar-04 17:41 
GeneralRe: Sharing data between dialog Pin
r00k1321-Mar-04 18:17
r00k1321-Mar-04 18:17 
GeneralRe: Sharing data between dialog Pin
jhwurmbach21-Mar-04 22:20
jhwurmbach21-Mar-04 22:20 
GeneralWSAStartup Pin
kpatry21-Mar-04 16:29
kpatry21-Mar-04 16:29 
GeneralRe: WSAStartup Pin
Ravi Bhavnani21-Mar-04 16:44
professionalRavi Bhavnani21-Mar-04 16:44 
GeneralRe: WSAStartup Pin
David Crow22-Mar-04 7:39
David Crow22-Mar-04 7:39 
GeneralRe: WSAStartup Pin
kpatry22-Mar-04 8:11
kpatry22-Mar-04 8:11 
GeneralRe: WSAStartup Pin
David Crow22-Mar-04 8:16
David Crow22-Mar-04 8:16 
GeneralRe: CFile EOF Pin
Ravi Bhavnani21-Mar-04 16:46
professionalRavi Bhavnani21-Mar-04 16:46 
Questionplease help me have a look at the program part below? Pin
vividtang21-Mar-04 14:47
vividtang21-Mar-04 14:47 
AnswerRe: please help me have a look at the program part below? Pin
Christian Graus21-Mar-04 14:58
protectorChristian Graus21-Mar-04 14:58 
QuestionWhere is modeAppend in Serialization? Pin
MeterMan21-Mar-04 13:30
MeterMan21-Mar-04 13:30 
AnswerRe: Where is modeAppend in Serialization? Pin
Rob Manderson21-Mar-04 21:52
protectorRob Manderson21-Mar-04 21:52 
GeneralCDialogBar does not support controls Pin
krugger21-Mar-04 13:19
krugger21-Mar-04 13:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.