c++ - Message is highlighted in blue in Modal box in VC++ -


We are using the code to populate the messages in a dialog box, when the message appears, the message blue Highlighted in - like we chose the message using the mouse. I want this message to not appear when it appears. Anyone can help me on this issue

CDialog :: Onintiology (); CFont * m_pFont = New CFont (); LOGFONT LF; Membrane (& amp; lf; 0, size (LOGFONT)); Lf.lfHeight = 16; Lf.lfWeight = FW_BOLD; Strncpy_s (lf.lfFaceName, "Arial", 6); M_pFont-> CreateFontIndirectA (& amp; nbsp;); GetDlgItem (IDC_EDIT1) - & gt; SetFont (m_pFont, true); M_message.SetWindowTextA ((LPCTSTR) message); Return TRUE;

Whenever the edit box becomes the selected item, the selection will be set to all text . If the editing box is the first in the tab order, or if you click on tab or click on it, then all the characters are selected. You can override this behavior by capturing EN_SETFOCUS event and resetting itself:

  void CMyDlg :: OnEnSetfocusEdit1 () {m_edit1.SetSel (0, 0) ); // or (-1, -1) to set the selection to  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -