Solved

Edit control in a image/object editor

Posted on 1997-04-07
10
187 Views
Last Modified: 2013-11-20
I'm developing a program which support to view DIBs, JPEG, PNG, and GIF, and also has an ability to draw rectangles, lines.. etc. I want to add text object in its capability list.
All objects including images are move/drag/resize able.(And they have implemented.(except edit object) Edit object wiil be made to be moved, resiezed....)
I first used CEdit, and then CRishEditCtrl, but they were not satisfactory.
First, there may be many texts in a plane. And the objects in a Document must able to be saved in a file.
Second, the cursor must be shown when it is selected by a user. Of course, those of other text objects must not be shown..
I can make a class that inherits CEdit movable, but it was so mutual..
Thus, I'm making a new class which can support the above features, but it is very difficult..
Anyone knows how I can do with Text object?
This question is specific to edit object. I already coded all of these, but I want to make the program better.
Thanks in advance...
0
Comment
Question by:parkmj
10 Comments
 

Author Comment

by:parkmj
ID: 1300894
Edited text of question
0
 

Expert Comment

by:Grzes
ID: 1300895
You must define your own (specific for your application) object oriented document architecture, that may contains images (DIBs, JPEG, PNG, and GIF), rectangles, lines, text and so on. Your document must be saved in this format.
Using this architecture each of objects may be inserted, dragged  or moved to specified location in your document or resized. If user selects an object, it is possible to display object specific tool window with its properties. For example, text object tool window may contains edit box and some controls used to configuration of font properties.

I hope this helps.
0
 

Author Comment

by:parkmj
ID: 1300896
Edited text of question
0
 

Author Comment

by:parkmj
ID: 1300897
I implemented almost all of the program. I want to hear text-specific answers, not general, abstract answer.
0
 

Author Comment

by:parkmj
ID: 1300898

0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 1

Expert Comment

by:rhgaracci
ID: 1300899
I am not clear on what you want to do.  I think that what you are saying is that you would like to be able to draw text on your images in the window, like an annotation, then be able to edit and move the text around the image.  Is this correct?
0
 

Author Comment

by:parkmj
ID: 1300900
Edited text of question
0
 

Author Comment

by:parkmj
ID: 1300901
Hi...
Sorry for unclear question... I wanted to explain the problem precisely, but I think I was not that clear....

You're right, rhgaracci... It is a problem of annotation...
I used CEdit or CRichEditCtrl for that, but there are some problems..
I expect your answer...
0
 
LVL 10

Accepted Solution

by:
RONSLOW earned 200 total points
ID: 1300902
I have an application which also includes rectangles, bitmaps, text etc.  I prompt for the text in a modeless property sheet (along with controls for font, colour, angle, justification etc).  I use the same technique for the properties of bitmap's, rectangles etc thereby getting a consistent user interface.  I can still drag the text (and other objects) around with the mouse of course.All I need to store is the text string, the position and the LOGFONT data for how the text is to be displayed (which includes the angle, bolding etc).If REALLY required, I/you could create an edit box and place it over the text object in your view to prompt for a new value (just like explorer does when you rename a file - or any CListCtrl does when you do a label edit).Alterntively, one can handle OnChar to build up the text string (and detect backspace and other editing keys and process appropriately) so you can edit in place on the screen (like paint programs do) -- I'll be doing that shortly after I've added all the other fetaures my program requires :-)Good luck
0
 

Author Comment

by:parkmj
ID: 1300903
Thanks for your answer, RONSLOW.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Expand data scrubbing tool 13 32
How to determine file rename from EventLog ? 2 41
Hibernate methods 2 68
modThree challenge 4 77
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

911 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

16 Experts available now in Live!

Get 1:1 Help Now