Hi. I am trying to underline a certain word in a rich edit control, located in a Dialog Box. I understand that I should select the word by sending the EM_SETSEL message, and then format it with the EM_SETCHARFORMAT message using a CHARFORMAT structure. Whenever I call the SendMessage function for the EM_SETCHARFORMAT message, it fails and returns 0. I have searched the board and msdn and have failed to discern the problem. Any help is appreciated. Thank you in advance.
if(SendMessage(GetDlgItem(hdlg,IDC_BIBLIO2),EM_SETCHARFORMAT,(WPARAM)SCF_WORD|SCF_SELECTION,(LPARAM)(CHARFORMAT FAR *)&cf)==0)