Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5969603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:15:14+00:00 2026-05-22T20:15:14+00:00

I have a RichEdit control in a dialog box. The RichEdit control displays RTF

  • 0

I have a RichEdit control in a dialog box. The RichEdit control displays RTF text. EM_AUTOURLDETECT causes the RichEdit control to properly format and recognize the hyperlink. When the mouse hovers over the link, the pointer changes to a hand, but the browser doesn’t launch once the link is clicked.

Am I missing some kind of event handler code?

case WM_INITDIALOG:
{
    // Create Richedit
    HWND hwndRE = CreateWindowA("RichEdit20A", "", WS_CHILD | WS_BORDER | WS_VSCROLL | ES_READONLY | ES_MULTILINE, 10, 10, 480, 220, hDlgWnd, 0, hInst, 0);

    SendMessage(hwndRE ,EM_AUTOURLDETECT,(WPARAM)TRUE,(LPARAM)0);
    //SendMessage(hwndRE ,EM_SETEVENTMASK, 1, ENM_LINK | ENM_CHANGE);

    ShowWindow(hwndRE, SW_SHOWNORMAL);
    SETTEXTEX SetTextEx;
    char* aboutdata = "{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Verdana;}}\\viewkind4\\uc1\\pard\\qc\\b\\f0\\fs20 www.whateverdomain.com} ");
    SendMessage(hwndRE, EM_SETTEXTEX,(WPARAM)&SetTextEx, (LPARAM)(LPCTSTR)aboutdata);
    return TRUE;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T20:15:15+00:00Added an answer on May 22, 2026 at 8:15 pm

    You can try something like this:

    case WM_NOTIFY:
        switch (((LPNMHDR)lParam)->code)
        {
            case EN_LINK:
                ENLINK * enLinkInfo = (ENLINK *)lParam;
    
                if (enLinkInfo->msg == WM_LBUTTONUP)
                {
                    // code which gets clicked URL using enLinkInfo->chrg and saves it in
                    // "urlString"
    
                    ShellExecute(NULL, "open", urlString, NULL, NULL, SW_SHOWNORMAL);
                }
                break;
    
            .... // More cases on WM_NOTIFY switch.
        }
        break;
    

    Basically, when the WM_NOTIFY code is EN_LINK, you get the clicked URL and launch it using ShellExecute.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a RichEdit control in my simple application that I wish to simulate
I have a Richedit that allows my users to format and view error messages
In win32, how do I setup a callback mechanism for RichEdit I have not
I have extended the RichTextBox control to implement much of the missing functionality provided
I use TRichEdit to edit text. I have WordWrap turned on which automatically wraps
Have some dates in my local Oracle 11g database that are in this format:
I have problem with counting characters in richedit (Delphi XE). For every new line
Have an app that can use tts to read text messages. It can also
Have you any idea how to find out if spell check suggestions dialog is
I already have a pretty decent syntax highlighter in my Rich Edit control but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.