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:julliard(a)winehq.com] Sent: September 10, 2003 6:31 PM To: Igor Grahek Cc: wine-devel(a)winehq.org Subject: Re: TreeView control - set correct hwndNotify
"Igor Grahek" <igorg(a)cadlink.com> 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 julliard(a)winehq.com