Click here to Skip to main content
15,901,373 members
Home / Discussions / COM
   

COM

 
AnswerRe: COM object create instance problem Pin
Steve S21-Mar-07 2:49
Steve S21-Mar-07 2:49 
GeneralRe: COM object create instance problem Pin
Itwymt21-Mar-07 3:00
Itwymt21-Mar-07 3:00 
GeneralRe: COM object create instance problem Pin
Steve S26-Mar-07 6:57
Steve S26-Mar-07 6:57 
GeneralRe: COM object create instance problem Pin
Itwymt12-Apr-07 22:16
Itwymt12-Apr-07 22:16 
QuestionHow to convert existing C# Windows Application to C# Web Application.. Pin
MPS_DotNet18-Mar-07 21:09
MPS_DotNet18-Mar-07 21:09 
AnswerRe: How to convert existing C# Windows Application to C# Web Application.. Pin
Colin Angus Mackay19-Mar-07 1:21
Colin Angus Mackay19-Mar-07 1:21 
AnswerRe: How to convert existing C# Windows Application to C# Web Application.. Pin
Dave Kreskowiak19-Mar-07 1:42
mveDave Kreskowiak19-Mar-07 1:42 
QuestionMapWindow ActiveX Control in MFC Application Pin
Maroon16-Mar-07 12:06
Maroon16-Mar-07 12:06 
Hi there.

I am working on developing a geobase scientific application. I need a control/component that I could put on a form view and use as map for a user to create watersheds and retrieve GIS information from it. While searching for such control I came across the MapWindow ActiveX control developed by a group of scientists at Idaho State University. On their website they also posted several sample projects, form-based VS2003 .NET included with manual/tutorial [^]. I was able to register the control and run the sample project. Everything worked fine and it did display the maps flawlessly. The problem begins with the MFC type project. And that's exactly the type of application I am working on.

I am a newbie to the COM and ActiveX controls under the MFC. I used excellent Michael Dunn's article[^] as a guide to getting the MapWindow ActiveX control to work. I realize or at least I think that MapWindow.ocx file is a COM object and we need to get a pointer to the objects within that control using the wrapper interface classes and so on, but for example when I try to get an access to the IShapefile interface the compiler says that there is no interface.

I tried to get help from their forum but noone responded yet.

Have someone had an experience in hosting the MapWindow ActiveX control in the MFC project? I'd really appreciate any help?

Thanks in advance,

Alex

P.S. Here are the snippets of the code that I wrote within CFormView class in order to get an access to the IShapefile interface that is of a coclass Shapefile in the MapWindow Control:

if( FAILED(CoInitialize(NULL)) ){
    ::AfxMessageBox( "COM Library Init Failed" );
    ::AfxAbort();
}

IShapefile* m_pShapefile = new IShapefile;
CLSID CLSID_Shapefile;
::CLSIDFromProgID( L"MapWinGIS.Shapefile.1", &CLSID_Shapefile );
IID IID_Shapefile;
// Create a COM object from the Shell Link coclass.
hr = ::CoCreateInstance ( CLSID_Shapefile,
                            NULL,
                            CLSCTX_INPROC_SERVER,
                            IID_Shapefile,
                            (void**) &m_pShapefile );

if( SUCCEEDED( hr ) ){
    CString s = "world_adm0.shp";
    m_pShapefile->Open( s, NULL );
}

Questionproblem with delete Pin
janadhana15-Mar-07 6:46
janadhana15-Mar-07 6:46 
AnswerRe: problem with delete Pin
Roger Stoltz15-Mar-07 7:13
Roger Stoltz15-Mar-07 7:13 
GeneralRe: problem with delete Pin
janadhana16-Mar-07 2:35
janadhana16-Mar-07 2:35 
GeneralRe: problem with delete Pin
Roger Stoltz16-Mar-07 3:15
Roger Stoltz16-Mar-07 3:15 
AnswerRe: problem with delete Pin
prasad_som15-Mar-07 18:38
prasad_som15-Mar-07 18:38 
GeneralRe: problem with delete Pin
janadhana16-Mar-07 2:38
janadhana16-Mar-07 2:38 
AnswerRe: problem with delete Pin
prasad_som16-Mar-07 2:42
prasad_som16-Mar-07 2:42 
QuestionHow to Create the plug-in toolbar for Windows Live Messenger using VC++? Pin
A.Venkata ramana14-Mar-07 23:48
A.Venkata ramana14-Mar-07 23:48 
QuestionInvalid pointer exception Pin
shivapriyak14-Mar-07 19:52
shivapriyak14-Mar-07 19:52 
AnswerRe: Invalid pointer exception Pin
prasad_som14-Mar-07 20:01
prasad_som14-Mar-07 20:01 
GeneralRe: Invalid pointer exception Pin
shivapriyak14-Mar-07 21:29
shivapriyak14-Mar-07 21:29 
AnswerRe: Invalid pointer exception Pin
prasad_som14-Mar-07 21:36
prasad_som14-Mar-07 21:36 
GeneralRe: Invalid pointer exception Pin
shivapriyak14-Mar-07 21:51
shivapriyak14-Mar-07 21:51 
GeneralRe: Invalid pointer exception Pin
prasad_som14-Mar-07 22:36
prasad_som14-Mar-07 22:36 
QuestionWhat does "THIS_" mean? Pin
[d3m0n]14-Mar-07 5:26
[d3m0n]14-Mar-07 5:26 
AnswerRe: What does "THIS_" mean? Pin
Roger Stoltz14-Mar-07 6:55
Roger Stoltz14-Mar-07 6:55 
GeneralRe: What does "THIS_" mean? Pin
[d3m0n]14-Mar-07 13:01
[d3m0n]14-Mar-07 13:01 

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.