Thank you chirag for your reply, i thought there is another way to do it,
however i tried to do it but its not working, here is some explanation:
Application powerPointApplication =new Application();
PowerPointApplication.Visible =MsoTriState.msoTrue;
PowerPointWindow window = new PowerPointWindow();
window.AssignHandle(new IntPtr(PowerPointApplication.HWND));
Here is the code for PowerPointWindow:
public class PowerPointWindow : NativeWindow
{
private const int WM_CLOSE = 0x10;
protected override void WndProc(ref Message m)
{
if (m.Msg != WM_CLOSE)
base.WndProc(ref m);
}
}
Now, the problem in this code that WndProc is never called, i tried to use
another approach by importing SetWindowLong from User32.dll but i'm getting
an error when trying use it (retrun value is 0 and GetLastError returned
this):
"An attempt was made to reference a token that does not exist"
please let me know if you want the code for SetWindowLong.
i know the subclassing should be within the same process like an add-in, so
Is it possible to subclass the powerpoint from another application like the
approach im following??
Thanks again