Posted by Cohen / Joseph Peter (ISE) on 1999-05-16
Hi all,
At uni we were given an assignment to build a program similar to a
very basic notepad.
they way I did it was to read in the key presses, assign them to a CString
called stringData and once the end of line had been reached or the enter
key had been pressed I added stringData to a CStringArray. Each time a key
was pressed the screen was redrawn outputting 1st the array and then
stringData.
now i would like to expand on this outside of uni so i can become more
familar with MFC, and also cause i like it and want to know more.
My question is, how would i go about in corporating the mouse to move the
caret to the desired position on the screen, when the mouse is clicked and
use it to edit the text at that position.
I already can move the caret by clicking the LMB, but i am stumped on how
to edit that text at that position.
eg. The qick brown fox.| <- caret
The q|ick brown fox.
The qu|ick brown fox.
I hope you understand what i am trying to do here and can help me.
Thanks in advance
JC
-0-0-0-0-0-0-0-0-0-0-0-0-0-0-1
C
Ought to
Be the
Only
Language.
ICQ - 1625177
Previous post | Next post | Timeline | Home