Solved

How to select and visible mark a region in an edit field

Posted on 2002-07-23
1
270 Views
Last Modified: 2013-11-20
Hi,

i have a big, multipleline Editfield, with it's controll-membervariable m_EditView, and a value-member-variable m_sView. I wanna search for the sting m_sSearch in the editfield and select it. This works fine if i use some actions like copy, paste, delete, but it isn't visible, not white letters on blue background or something else. If the "selected" text is not in a visible range, the edit-field scrolls by itself to the "selected" text.

Here's the "code" :

void CMyDialog::OnButtonSearch()
{
UpdateData();
int Pos = m_sView.Find( m_sSearch );

if( Pos >= 0 )
{
        m_EditView.SetSel( Pos, Pos + m_sSearch.GetLength() );
}
}
0
Comment
Question by:DennisWood
1 Comment
 
LVL 8

Accepted Solution

by:
fl0yd earned 100 total points
ID: 7174344
multiple post -- please put continue to this link:

http://www.experts-exchange.com/mfc/Q_20327076.html
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Turn a spreadsheet into a vba executable. 2 87
sumNumber challenge 16 122
SQUD PROXY SERVER, UNIX, SLL/HTTPS 5 95
Capture logon name 13 73
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question