Solved

text Selection in CView

Posted on 1998-09-28
1
237 Views
Last Modified: 2013-11-20
Where can I a find a sample or something on implementing
text selection in a CView (must be CView, text color
inverted from black to white when selected etc...)
0
Comment
Question by:searching
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 3

Accepted Solution

by:
zhongbing earned 100 total points
ID: 1322652
only a skeleton here:
1. message map ON_LBUTTONDOWN
               ON_LBUTTONUP
               ON_MOUSEMOVE
   and add 2 member variable : begin selection flag
                         and   begin selection point

2. in OnLButtonDown
    set the select flag true and begin select point
    SetCapture to track mouse even if it out the current windows
3 in OnMouseMove
    compute the select text, use the begain selecting piont and current mouse point, be cafullly if mouse point outside the window.
     reverse draw the text ( maybe use CClientDC or call invalidate() to let the OnPaint redraw)
4 in OnLButtonUp
     set the selection flag false
0

Featured Post

Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

Question has a verified solution.

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

If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

636 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