Click here to Skip to main content
15,921,226 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Speech SDK Pin
alex__b1-Aug-05 17:52
professionalalex__b1-Aug-05 17:52 
GeneralRe: Speech SDK Pin
Blake Miller2-Aug-05 4:01
Blake Miller2-Aug-05 4:01 
GeneralRe: Speech SDK Pin
alex__b2-Aug-05 4:16
professionalalex__b2-Aug-05 4:16 
GeneralRe: Speech SDK Pin
Blake Miller2-Aug-05 4:34
Blake Miller2-Aug-05 4:34 
GeneralRe: Speech SDK Pin
alex__b2-Aug-05 4:43
professionalalex__b2-Aug-05 4:43 
GeneralEthernet/ network question Pin
Stan the man29-Jul-05 17:27
Stan the man29-Jul-05 17:27 
GeneralRe: Ethernet/ network question Pin
geo_m31-Jul-05 10:12
geo_m31-Jul-05 10:12 
GeneralRestricting area in editable HTML user can edit. Pin
David Fleming29-Jul-05 16:35
David Fleming29-Jul-05 16:35 
Here's what I'm trying to accomplish (and I admit right up front that I am a hobby coder and some of this stuff is over my head, but I learn best by trying something new)...

What I would like to be able to do is have an editable HTML document, except have areas that are "off limits." For example, having the top portion of the page, with logos and header stuff NOT editable, but everything below that editable.

I have read Rob Manderson's article on Using IHTMLEditDesigner[^]. I think I have a fair understanding of how it works. I posted essentially this message on the article's page, but no one has responded, so I figured I'd try here.

So what I was thinking is to set up separate sections (several
sections) and set perhaps the background color of the off-limits areas to a light gray (so that the user can see what is off-limits). Then if the user clicks in or moves the cursor to an area of the document that is in the off-limits area, the editor would simply jump the cursor back out of the off-limits area -- perhaps to the first position below the off-limits area (or perhaps simply cancel the mouse-click or cursor move). I would also need to disable the ability to click and drag to highlight an area within the off-limits section.

So, the first question is: is it doable?
The second question is: how do I do it? And I don't expect you guys the write this for me, but point me in the direction of being able to track where the cursor is in the document and programmatically move it elsewhere, how to detect the background color of the element at the cursor location (or selected text in case the user clicks in an editable section and then drags into an off-limits section), etc.

I think I have a basic understanding of Rob's article, but I'm stuck as to where to go from here. I have tried just a simple modification of his demo program where I try to cancel the click in a DIV (or keydown or keypress or mousedown) instead of the ondrag, but so far to no avail. I guess my very first question is how do I cancel the user's ability to click or keypress within a DIV?

Thanks for any ideas/suggestions.

GeneralRe: Restricting area in editable HTML user can edit. Pin
David Fleming1-Aug-05 20:43
David Fleming1-Aug-05 20:43 
GeneralEdit Box Notification Pin
Member 12742129-Jul-05 14:13
Member 12742129-Jul-05 14:13 
GeneralRe: Edit Box Notification Pin
John R. Shaw29-Jul-05 14:29
John R. Shaw29-Jul-05 14:29 
GeneralRe: Edit Box Notification Pin
Stan the man29-Jul-05 17:13
Stan the man29-Jul-05 17:13 
GeneralVery very stupid question Pin
Lampros Giampouras29-Jul-05 12:53
Lampros Giampouras29-Jul-05 12:53 
GeneralRe: Very very stupid question Pin
John R. Shaw29-Jul-05 13:48
John R. Shaw29-Jul-05 13:48 
GeneralRe: Very very stupid question Pin
Toby Opferman29-Jul-05 14:00
Toby Opferman29-Jul-05 14:00 
GeneralRe: Very very stupid question Pin
John R. Shaw29-Jul-05 14:20
John R. Shaw29-Jul-05 14:20 
GeneralRe: Very very stupid question Pin
ThaSaVa30-Jul-05 0:01
ThaSaVa30-Jul-05 0:01 
GeneralRe: Very very stupid question Pin
Lampros Giampouras30-Jul-05 2:48
Lampros Giampouras30-Jul-05 2:48 
Generallocalizing problem Pin
Razi Al-Sayed29-Jul-05 9:53
Razi Al-Sayed29-Jul-05 9:53 
GeneralRe: localizing problem Pin
Michael Dunn29-Jul-05 19:09
sitebuilderMichael Dunn29-Jul-05 19:09 
Questioncomport; never reaches EOF? Pin
quarry_0629-Jul-05 9:15
quarry_0629-Jul-05 9:15 
QuestionMFC Dll in non-MFC app? Pin
Anacreon29-Jul-05 7:55
Anacreon29-Jul-05 7:55 
AnswerOne other note Pin
Anacreon29-Jul-05 8:25
Anacreon29-Jul-05 8:25 
AnswerRe: MFC Dll in non-MFC app? Pin
Michael Dunn29-Jul-05 9:46
sitebuilderMichael Dunn29-Jul-05 9:46 
GeneralRe: MFC Dll in non-MFC app? Pin
Anacreon29-Jul-05 10:07
Anacreon29-Jul-05 10:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.