Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Edit control in a image/object editor

Posted on 1997-04-07
10
Medium Priority
?
195 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

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
 
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 400 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

782 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