On 30/07/07, Jan Dubois <[EMAIL PROTECTED]> wrote: > On Sun, 29 Jul 2007, Robert May wrote: > > On 29/07/07, Jan Dubois <[EMAIL PROTECTED]> wrote: > > > PS: Please let me know if you happen to know a mechanism to create a > > > message-only window on 98/NT (a window that is not top-level and > > > will not receive broadcast messages). If this were possible, > > > then we could get rid of PostThreadMessage() completely. > > > > I can't speak for WinNT, as I don't have it available, but on Win98, > > using HWD_MESSAGE as the parent window to CreateWindowEx() appears to > > work fine (despite what MSDN says). Using it I end up with a window > > that is a child of a hidden system window. The window is not top > > level, not visible, and I can't make it receive a broadcast message. > > I've seen at least anecdotal evidence that using HWND_MESSAGE on 98 might > be somewhat dangerous: > > http://www.virtualdub.org/blog/pivot/entry.php?id=153 > > So I'm not sure if we want to ignore MSDN on this point.
Thanks for that link. I had already readr it, and can confirm that GetAncestor(hwnd, GA_ROOT) crashes applications on my Win98 box. I'm nott 100% sure, what the reference to DialogBoxParam is, but if we assume that he was passing the message window handle as the owner window for a dialog, then it's well documented that this first thing the DialogBox...() functions do is call GetAncestor(..., GA_ROOT), to account for people passing a child window handle, which is not a valid owner-window. As we aren't likely to ever call GetAncestor() or DialogBox...() on the window, we might be safe. I'm less happy about what he says about the BSOD. There's surprisingly little information on on the web regarding HWND_MESSAGE. I think the safest bet is to keep using thread messages for the earlier systems. It's a shame, as loosing that complexity would have been good. Regards, Rob. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Perl-Win32-GUI-Users mailing list Perl-Win32-GUI-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users http://perl-win32-gui.sourceforge.net/