Additional Include Directories : ..\sdk45\Include;%(AdditionalIncludeDirectories)
Debug Command : ..\sdk45\dll/$(ProjectName).exe
Additional Library Directories : ..\sdk45\Lib;%(AdditionalLibraryDirectories)
Additional Dependencies : KMpeg4.lib;%(AdditionalDependencies)
===================================================================
http://stackoverflow.com/questions/2921702/change-c-cli-project-to-another-framework-than-4-0-with-vs2010
<PropertyGroup Label="Globals">
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<others...>
</PropertyGroup>
In VS 2010 if the toolset is installed go to project properties->config properties->general and change Platform Toolset from v90 to v100.

PInvoke vs IJW vs Wrapper
http://msdn.microsoft.com/en-us/library/ms235282.aspx
if C function return pointer then use IJW instead

===================================================================
How to use Linker

http://msdn.microsoft.com/en-us/library/ms384212%28VS.71%29.aspx
Managed (.NET) DLL does not use static var
MFC rely on static Var.
DLL without entry point cannot init static var (except simple type as int)
=> MOdify mixed-mode DLL need to modify to have explicit entry point = convert managed DLL to Mixed Mode

===================================================================
How to use MfcAdapter

...


===================================================================
Pass Control HANDLE from C# to C++ for CWnd
http://forums.codeguru.com/showthread.php?380571-Using-c-dll-method-in-c-w-CWnd*-parameter

===================================================================
Calling Convention
http://en.wikipedia.org/wiki/X86callingconventions

===================================================================
Port C++ MFC


===================================================================
WPF Handle & Host Excel in WPF
http://go4answers.webhost4life.com/Example/get-handle-image-control-wpf-68331.aspx
http://www.abhisheksur.com/2010/12/win32-handle-hwnd-wpf-objects-note.html

i wanted to host Excel in my WPF application and this post was very useful for me.

DllImport("User32", CharSet = CharSet.Auto, ExactSpelling = true)
internal static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndParent);

excelApplication.ActiveWorkbook.SaveAs(AppDomain.CurrentDomain.BaseDirectory name ".xls");
excelApplication.Workbooks.Open(AppDomain.CurrentDomain.BaseDirectory name ".xls");

excelApplication.Visible = true;

var windowHwnd = new WindowInteropHelper(this); //this == wpf window
var hWnd = windowHwnd.Handle;

SetParent((IntPtr)excelApplication.Hwnd, hWnd);