Solved

text Selection in CView

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
function returning CString in a regular win32 DLL 8 190
Pressing cancel button with C# UI Automation 3 81
fizzArray  challenge 1 96
has77  challenge 9 92
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…
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.

821 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