- This topic has 6 replies, 2 voices, and was last updated 4 years, 9 months ago by Support.
-
AuthorPosts
-
February 13, 2020 at 6:59 pm #68464HeDiBoParticipant
When debugging (I use Delphi XE4) and having a breakpoint within a form that’s part of a Popup Window shown with ShowPopupForm, at the moment the breakpoint is hit, no application and no modal window can get the cursor activated in the area bounded by by the popup window’s area (it doesn’t have to be in view, but it does monopolize that area).
The reason of course is that normally, activating another window would discard the popup, but in this case it is suspended by the breakpoint.
So, maybe you have to fiddle around with the Window creation parms when creating the popup window.February 15, 2020 at 11:57 pm #68469SupportKeymasterWhich parameters do you mean?
Do you mean that popup window should not be closed automatically in debugging mode?February 16, 2020 at 2:32 am #68471HeDiBoParticipantI’m not sure which parameters.
What happens is that the popup window monopolizes the mouse cursor, although it is not visible.
Try this:
Make a project with a popup window.In the form of the popup window set a breakpoint. Run the project in the debugger until it hits the breakpoint. Now switch to another program, let’s say the explorer. Try to select a file that is in the same area as the popup window (now hidden) is. It is not possible.February 22, 2020 at 7:00 pm #68507HeDiBoParticipantThis is a better view on the problem.
It’s part of the screen with the expolorer on it. But, because the popup window’s process is in suspended state by the Delphi debugger, I cannot get rid of it. It seems to think it has to be on top always.Attachments:
You must be logged in to view attached files.February 25, 2020 at 8:36 am #68515SupportKeymasterYou can try to search “HWND_TOPMOST” in the acPopupController.pas unit and replace it to “HWND_TOP”.
This is a reason.February 25, 2020 at 4:52 pm #68519HeDiBoParticipantThere are 5 occurrences of HWND_TOPMOST in that module. I don’t think it is a good idea to change all of them. After all, you must have had a good reason to put them there.
I know this hWndInsertAFter parameter may cause problems if not used correctly (like a windows not showing at all). So, I’m not feeling OK about this.
There may be another way of going about this. Maybe you could use HWND_TOPMOST only if project is not being run in the Delphi debugger. That would give the best of both worlds.So, in the initialization of the acPopupController have code like this:
if System.DebugHook = 0 then hWndInsertAfter := HWND_TOPMOST else hWndInsertAfter := HWND_TOP
February 27, 2020 at 8:28 am #68526SupportKeymasterI will add something similar in the nearest release.
-
AuthorPosts
- You must be logged in to reply to this topic.