anchor.diff:    end;
     dx := (2 * bx);
     dy := (2 * by) + bt;
  +end;
  +
  +function fpgCBTProc(nCode: longint; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
  +begin
  +  if nCode < 0 then
  +  begin
  +    Result := CallNextHookEx(wapplication.ActivationHook, nCode, wParam, lParam);
  +    Exit; //==>
  +  end;
  +
  +  if (nCode = HCBT_ACTIVATE) then
  +  begin
  +    // write('Hooked HCBT_ACTIVATE at '+IntToStr(wParam)+': ');
  +    if (wapplication.TopModalForm <> nil) and
  +       (wParam <> TfpgWindowImpl(wapplication.TopModalForm).FWinHandle) then
  +    begin
  +      // writeln('stopped');
  +      SetActiveWindow(TfpgWindowImpl(wapplication.TopModalForm).FWinHandle);
  +      Result := 1;
  +    end else
  +    begin
  +      // writeln('passed');
  +      Result := 0;
  +    end;
  +  end else
  +    Result := CallNextHookEx(wapplication.ActivationHook, nCode, wParam, lParam);
   end;
   
   function fpgWindowProc(hwnd: HWND; uMsg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
  
positive.code:     { To avoid problems, window classes should be accessible
        from RegisterClass call till the program is terminated. }
      HiddenWndClass: TWndClass;
      function    GetHiddenWindow: HWND;
      function    DoGetFontFaceList: TStringList; override;
    public
      constructor Create(const AParams: string); override;
      function    DoMessagesPending: boolean;
      procedure   DoWaitWindowMessage(atimeoutms: integer);
      procedure   DoFlush;
  
negative.code:             if (PopupListFirst.ClassName <> 'TDropDownWindow') then
  //            if not (PopupListFirst is TfpgPopupWindow) then
                blockmsg := True;
            end;
            //end else
            //if (wapplication.TopModalForm <> nil) then
            //begin
              //if (wParam = 0) and (wapplication.TopModalForm = w) then
              //begin
                //{$IFDEF DEBUG}
                //writeln(' Blockmsg = True (part 2)');
                //{$ENDIF}
                //blockmsg := True;
              //end
              //else if (wParam <> 0) and (wapplication.TopModalForm <> w) then
              //begin
                //{$IFDEF DEBUG}
                //writeln(' Blockmsg = True (part 3)');
                //{$ENDIF}
                //blockmsg := True;
              //end;
            //end;
  
            if not blockmsg then
              Result := Windows.DefWindowProc(hwnd, uMsg, wParam, lParam);
  