Using MapWinGIS in MFC


Hello Friends,
I tried to develop program in MFC using MapWinGIS activeX control.
I used Class wizad to add new class of MFC by this toturial Add a class from an ActiveX control
A new class added to Program. I can use some method such as PixelsPerDegree,…
But when i tried to add some file to map control using method AddLayerFromFilename, the program is running but alert “Type mismatch”.
Please, help me.


Hello @WinterNguyen

Could you attach the section of code you are using to add the Layer? Perhaps we can see what is happening. Thank you.



I tried to attach. But it falied. I think that something must be configured for project because mapwingis used external library such as gdal,…


You can also paste the relevant code in the reply.
When you start with an empty line (newline) and prepend all code lines with at least 4 spaces your code will be formatted.
You can also just paste in your code, select it and use the button </> to format your code.

This is a code line
And this one as well