CreateWindowEx set parent to GetDesktopWindow by default and if
cs->hwndParent is null or if cs->hwndParent == HWND_MESSAGE it stays
that way.
Maybe check can be changed this way:

+    infoPtr->hwndNotify = lpcs->hwndParent;
+    if(!infoPtr->hwndNotify || infoPtr->hwndNotify == HWND_MESSAGE)
+        infoPtr->hwndNotify = GetParent(hwnd);

but not removed.

Igor

> -----Original Message-----
> From: Alexandre Julliard [mailto:[EMAIL PROTECTED] 
> Sent: September 10, 2003 6:31 PM
> To: Igor Grahek
> Cc: [EMAIL PROTECTED]
> Subject: Re: TreeView control - set correct hwndNotify
> 
> 
> "Igor Grahek" <[EMAIL PROTECTED]> writes:
> 
> > +    infoPtr->hwndNotify = lpcs->hwndParent;
> > +    if(!IsWindow(infoPtr->hwndNotify))
> > +        infoPtr->hwndNotify = GetParent(hwnd);
> 
> Why do you need the IsWindow() check?  AFAICS the parent should always
> be valid (or possibly 0 but then GetParent() will be 0 too).
> 
> -- 
> Alexandre Julliard
> [EMAIL PROTECTED]
> 


Reply via email to