Tech Support > Microsoft Windows > Development Resources > FindWindow("#32770", null) returning wrong window Options
FindWindow("#32770", null) returning wrong window Options
Posted by vidishasharma@gmail.com on April 30th, 2008


I want to add the button in reading pane of outlook 2003. This can be
achieved only using
win32 api's . I found the class name of reading pane using
spy++(a visual studio tool). It was #32770 (dialog) however when I
programatically try to
find all the child window of this class name I get all the child
window of 'outlook send and recieve progress'. I agree that it is
also
a dialog window. there are many such dialog windows in outlook how do
I instruct my outlook to get only reading pane dialog and not not any
other dialog availabe in outlook.

//I found the window(which gives wrong window)
_windowHandle = FindWindow("#32770", null);


if (_windowHandle != IntPtr.Zero)
{
//I try to get all the child windows for that window
to check if I have found reading pane
List<IntPtr> childWindows =
OutlookWin32Window.EnumChildWindows(_windowHandle) ;
// get a list of captions for the child windows
List<string> childWindowNames =
OutlookWin32Window.GetWindowNames(childWindows);
}


This is all getting me wrong window basically _windowHandle =
FindWindow("#32770", null); itself is returning wrong window.


How do I get the right window. Sorry if I am asking very basic
question as I am not at all familiar with win32 api's




Posted by David on April 30th, 2008


vidishasharma@gmail.com wrote:
Which button ?
What is your goal ?
You can't just add a button like that..