How to implement the mouse click for URLs at rich edit control
I added a read-only rich edit 2.0 control to my dialog (code is using C windows API, the dialog is created by using function DialogBox ) At the dialog call back, at the WM_INITDIALOG, I add the following code to enable url detection and also enable the event ENM_LINK is sent to the parent dialog instead of the rich edit control itself: LRESULT mask = SendMessage(hWndText, EM_GETEVENTMASK, 0, 0); //hWndText is rich edit control SendMessage(hWndText, EM_SETEVENTMASK, 0, mask | ENM_LINK); ::SendMessage(hWndText, EM_AUTOURLDETECT, TRUE, NULL); I had a little trouble to enable the url detection