Opened 12 years ago

Closed 12 years ago

#11314 closed defect (fixed)

Standard cursor on popup menu if wxTextCtrl using Richedit

Reported by: malcompl Owned by:
Priority: normal Milestone: 3.0.0
Component: wxMSW Version:
Keywords: wxTextCtrl Cc:
Blocked By: Blocking:
Patch: yes


Windows Richedit control uses I-beam cursor on popup menu instead of standard (arrow) cursor when popup menu is being processed.
Probably it's bug on the richedit control implementation, but it's simple to fix on wx code.

Attachments (1)

richcur.patch download (1.1 KB) - added by malcompl 12 years ago.

Download all attachments as: .zip

Change History (6)

Changed 12 years ago by malcompl

comment:1 Changed 12 years ago by vadz

  • Milestone set to 3.0
  • Status changed from new to confirmed

It's a bug in wxMSW because the cursor is changed correctly if I use richedit in a simple Win32 test application. Unfortunately I really don't see why does this happen as our WM_SETCURSOR code doesn't seem to come into play at all (in the text sample we never handle this message).

Still, I'd strongly prefer to find and fix the bug rather than add a workaround for it...

If we don't find it until 3.0 it should be safe to apply the patch to fix it. But, again, it would be much better to avoid the need for it.

comment:2 Changed 12 years ago by malcompl

I thinks it's not a wx bug. Most of app handle the WM_CONTEXTMENU on parent, but we on wx subclassing all windows and we 'catch' the WM_CONTEXTMENU message in richedit window procedure.
Maybe it's generate the problem?

comment:3 Changed 12 years ago by vadz

So do you mean it works correctly if we show the menu in reaction to WM_CONTEXTMENU in the parent? This could be easily tested by overriding MSWWindowProc() in a derived frame class but I just don't see what could this possibly change...

comment:4 Changed 12 years ago by malcompl

I think that should be works good. I tested it and cursor seems to be ok, but the event is generated for all client area on frame, so it's bad solving.

comment:5 Changed 12 years ago by VZ

  • Resolution set to fixed
  • Status changed from confirmed to closed

(In [62718]) Explicitly set the cursor when showing popup menu on text control in wxMSW.

Without this, an I-beam cursor is used when a menu is shown by a rich text
control. Set the arrow cursor explicitly to work around this apparent bug in
the native control.

Closes #11314.

Note: See TracTickets for help on using tickets.