Menu

RxRichEdit & popup-menu & win XP/2K

RxLib Bugs
Anonymous
2002-06-26
2002-10-15
  • Anonymous

    Anonymous - 2002-06-26

    Hello.

    Problem: I open a new project, add a PopUp menu (with at least one item) and a RxRichEdit-field. Now I assign the popup to the RxRichEdit-field and start the 'program'.

    When I try to right-click on the RxRichEdit-field nothing happens!
    Nevertheless if I click the 'windows-context-menu'-key on the keyboard the popup-menu appears.

    This only occurs under win 2K & XP - if I start the the .exe-file under 98 everything works fine.

    Known feature or bug?!

    Stefan

     
    • KweeChang Ling

      KweeChang Ling - 2002-10-15

      If you read the source code RxEiched.pas, you will find the following lines

      {$IFDEF RX_D5}
      procedure TRxCustomRichEdit.WMRButtonUp(var Message: TMessage);
      begin
        { RichEd20 does not pass the WM_RBUTTONUP message to defwndproc, }
        { so we get no WM_CONTEXTMENU message. Simulate message here.    }
        if Win32MajorVersion < 5 then
          Perform(WM_CONTEXTMENU, Handle, LParam(PointToSmallPoint(
            ClientToScreen(SmallPointToPoint(TWMMouse(Message).Pos)))));
        inherited;
      end;
      {$ENDIF}

      Change the line
        if Win32MajorVersion < 5 then
      into
        if Win32MajorVersion > 4 then

      and it will work.

      It work on my XP OS.

       

Log in to post a comment.