RE: hide cursor for kiosk application (powerpoint)
- From: v-lliu@xxxxxxxxxxxxxxxxxxxx (Linda Liu [MSFT])
- Date: Wed, 16 May 2007 02:54:28 GMT
Hi M,
Thank you for your prompt response.
The FindWindow function can only retrieves a handle to the top-level window
whose class name and window name match the specified strings. This function
does not search child windows.
To search child windows, use the FindWindowEx function. This function
searches the immediate child windows of the specified parent window.
The following is the code to retrieve the handle of the paneClassDC "Slide
Show" window.
using System.Runtime.InteropServices;
[DllImport("user32.dll")]
static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter,
string lpszClass, string lpszWindow);
[DllImport("user32.dll")]
static extern private IntPtr GetWindow(IntPtr hWnd, int uCmd);
const int GW_CHILD = 5;
IntPtr child1 = FindWindowEx(this.webBrowser1.Handle, IntPtr.Zero, "Shell
Embedding", "");
IntPtr child2 = FindWindowEx(child1, IntPtr.Zero, "Shell DocObject View",
"");
IntPtr child3 = FindWindowEx(child2, IntPtr.Zero, "childClass", "");
// because the 'childClass' window only has one child window and the child
window has a long window name, I use the GetWindow function to get the
child window for convenience
IntPtr child4 = GetWindow(child3, GW_CHILD);
IntPtr child5 = FindWindowEx(child4, IntPtr.Zero, "paneClassDC", "Slide
Show");
The variable child5 returns the handle of of the paneClassDC window.
Hope this helps.
Sincerely,
Linda Liu
Microsoft Online Community Support
.
- Follow-Ups:
- RE: hide cursor for kiosk application (powerpoint)
- From: lockness
- RE: hide cursor for kiosk application (powerpoint)
- References:
- RE: hide cursor for kiosk application (powerpoint)
- From: Linda Liu [MSFT]
- RE: hide cursor for kiosk application (powerpoint)
- From: lockness
- RE: hide cursor for kiosk application (powerpoint)
- Prev by Date: Re: Detach Application.ThreadException Event, really?
- Next by Date: Re: webbrowser
- Previous by thread: RE: hide cursor for kiosk application (powerpoint)
- Next by thread: RE: hide cursor for kiosk application (powerpoint)
- Index(es):
Relevant Pages
|
|