Hide highlighting from SetSel
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Hide highlighting from SetSel

  1. #1
    Join Date
    Mar 2012
    Posts
    20

    Hide highlighting from SetSel

    Hi,

    I'm using SetSel in my RichEditCtrl window to replace certain lines of text. The problem is its not aesthetically pleasing when the window highlights the word for a split second and then replaces the text because it seems to flash the screen in a seizure like manner.

    How do I hide the highlightings from SetSel?

  2. #2
    Join Date
    Mar 2012
    Posts
    20

    Re: Hide highlighting from SetSel

    I solved the issue:


    In the on create
    SetEventMask(GetEventMask()|ENM_UPDATE);

    then activate the message handler

    void CCtrl::OnEnUpdate()
    {
    ::SendMessage(m_hWnd,WM_KILLFOCUS,0,0);
    }

    and then finally set the option to
    HideSelection(1,1);


    but now I have to manually update by calling
    UpdateWindow();

    Which is fine..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center