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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
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.