Solved

text Selection in CView

Posted on 1998-09-28
1
232 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
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Decoding 32 bit binary streams 6 31
Adapt this command to show who installed 29 102
fizzArray2 challenge 1 61
Window placement 17 65
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

759 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now