Thread: Right Click on Rich Edit

  1. #1
    Registered User sean345's Avatar
    Join Date
    Mar 2002

    Right Click on Rich Edit

    I want to capture the WM_RBUTTONUP message when my richedit revieves it so I can open a popup menu. I am not sure but I think I will have to subclass the control. Has anyone ever tried this with a richedit control and have some source code so i can see how they did it? I am using WinAPI and C. Thanks.

    - Sean
    If cities were built like software is built, the first woodpecker to come along would level civilization.
    Black Frog Studios

  2. #2
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Waterloo, Texas
    R U kidding? This IS Windows. Welcome to the world of do-it-yourself! Okay, there may be an easy way to do it, but that I don't know. What I DO know it that you can extract the coords of the mouse gesture from the LPARAM at the time of the message. The x is in the LOWORD(lParam), y in the HIWORD(lParam). Test it with PtInRect() (with the rect of the edit)...
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
        return std::pow
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. (Multiline) Edit Control Limit
    By P4R4N01D in forum Windows Programming
    Replies: 9
    Last Post: 05-17-2008, 11:56 AM
  2. Automatic Rich Text Edit
    By Queatrix in forum Windows Programming
    Replies: 3
    Last Post: 12-27-2006, 02:18 PM
  3. Rich Edit controls
    By maxorator in forum Windows Programming
    Replies: 2
    Last Post: 11-01-2006, 07:35 AM
  4. Rich Edit Control Colors
    By mrafcho001 in forum Windows Programming
    Replies: 2
    Last Post: 07-08-2006, 04:26 PM
  5. How the rich get rich [Long]
    By nickname_changed in forum A Brief History of
    Replies: 19
    Last Post: 05-05-2005, 10:36 PM