Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^5: Win32::GUI: how to find BrowseForFolder()'s handle?

by Anonymous Monk
on Sep 22, 2012 at 08:00 UTC ( [id://995074]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Win32::GUI: how to find BrowseForFolder()'s handle?
in thread Win32::GUI: how to find BrowseForFolder()'s handle?

First some notes SSCCE (its like noise )

Here is a complete (compileable and running) code example.

Thanks. I see what you're talking about now. You can fix this by removing

-addexstyle => WS_EX_TOPMOST,
from $window/Main Window

:D

That may or may not be what you want, but its a fix ;D

2. How does one find the desktop windows handles? If we could find BrowseForFolder()'s handle, we could raise it to the foreground (how?)

If you wonder how it works, UTSL http://cpansearch.perl.org/src/ROBERTMAY/Win32-GUI-1.06/GUI.xs

Would you look at that # -owner => WINDOW

Yup, specifying   -owner => $Window, does the trick (it works), no WS_EX_TOPMOST required

Replies are listed 'Best First'.
Re^6: Win32::GUI: how to find BrowseForFolder()'s handle?
by HelenCr (Monk) on Sep 22, 2012 at 11:52 UTC

    Thank you. That was instructive, and it actually solves the issue.

    (SSCCE and UTSL are instructive too - learned something new).

    A follow-up question: the role of the "-owner" option is not clear to me. Why and when is it necessary, and why does it fix the problem?

    TIA Helen

      A follow-up question: the role of the "-owner" option is not clear to me. Why and when is it necessary, and why does it fix the problem?

      It is necessary whenever you're using the functional interface

      If you had used $Window->BrowseForFolder() it would have happened automagically

      It lets the windowing system/ window manager, decide correctly to allow children of parent to display on top of parent , in effect it propagates the WS_EX_TOPMOST flag to the children

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://995074]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2024-04-23 11:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found