Y
Yazeed
Hi All,
Window.Caption property in powerpoint is readonly (I DONT KNOW WHY!!!),
however im trying to change it, the only way i know is to use P/Invoke to
change that caption, but its not working, here is code snippet from my class:
//Declaration
[DllImport("user32.dll")]
public static extern IntPtr FindWindow(string strclassName, string
strWindowName);
[DllImport("user32.dll", CharSet = CharSet.Auto)]
static extern IntPtr SendMessage(IntPtr hWnd, int Msg, IntPtr
wParam, string lParam);
private const int WM_SETTEXT = 0x000C;
//in my method
IntPtr HWND = FindWindow(null, "Test.pptx"); //This returns 0
IntPtr result= SendMessage(HWND , WM_SETTEXT,
IntPtr.Zero,"Caption Changed");
HWND always return 0 and also if i used Application.Windows[1].HWND in
sendMessage method, the caption doesnt change.
So is it possible to change the caption??
Thanks in advance
Window.Caption property in powerpoint is readonly (I DONT KNOW WHY!!!),
however im trying to change it, the only way i know is to use P/Invoke to
change that caption, but its not working, here is code snippet from my class:
//Declaration
[DllImport("user32.dll")]
public static extern IntPtr FindWindow(string strclassName, string
strWindowName);
[DllImport("user32.dll", CharSet = CharSet.Auto)]
static extern IntPtr SendMessage(IntPtr hWnd, int Msg, IntPtr
wParam, string lParam);
private const int WM_SETTEXT = 0x000C;
//in my method
IntPtr HWND = FindWindow(null, "Test.pptx"); //This returns 0
IntPtr result= SendMessage(HWND , WM_SETTEXT,
IntPtr.Zero,"Caption Changed");
HWND always return 0 and also if i used Application.Windows[1].HWND in
sendMessage method, the caption doesnt change.
So is it possible to change the caption??
Thanks in advance