Discussions related to Visual Prolog
Victor Yukhtenko
Posts: 11
Joined: 3 May 2001 23:01

Ribbon activity problem in the SDI project

Post by Victor Yukhtenko »

Description of the Problem
The issue was initially observed in Vip10.
I have now checked its status in Vip11, and the problem persists.

Steps to Reproduce
Open the attached test project.
Run the project.
Press the rightmost button on the ribbon.
A dialog appears. Close the dialog.
Observed Behavior
After closing the dialog, the ribbon becomes unresponsive to mouse hover or clicks on its buttons.
Clicking in the message area restores the ribbon's activity.
Suspected Cause
It appears that the main loop does not return to its normal state after the dialog is closed.

Code Snippet for the Main Loop

Code: Select all

class predicates     loop : (gui_native::msg Msg).   clauses     loop(Msg) :-         WM_QUIT = getMessage_update(Msg),         if true = WM_QUIT then             gui_native::msg(:WParam = WParam | _) = Msg,             programControl::setApplicationExitCode(getUnsigned(WParam))         else             try                 if not(tryTranslateAccelerator(Msg)) and not(isDialogMessage(vpi_native::getActiveDialog(), Msg)) then                     _ = gui_native::translateMessage(Msg),                     _ = gui_native::dispatchMessage(Msg)                 end if             catch TraceId do                 mainExe::dumpException(TraceId)             end try,             loop(Msg)         end if.
You do not have the required permissions to view the files attached to this post.
Best Prolog
Victor Yukhtenko.
User avatar
Thomas Linder Puls
VIP Member
Posts: 1468
Joined: 28 Feb 2000 0:01

Re: Ribbon activity problem in the SDI project

Post by Thomas Linder Puls »

Hi, Victor. Thanks for pointing out this problem.

Actually, there is nothing wrong with the "loop" or the ribbonControl.

The problem is that when your dialog closes the focus goes to the window with the frame, titlebar, close "cross", etc. Which I don't think should ever have focus.

But we have bad experience with doing stuff that changes focus. We really prefer that Windows handles such things itself.

We will look for a solution.
Regards Thomas Linder Puls
PDC