Solved

Edit control in a image/object editor

Posted on 1997-04-07
10
190 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Technology Partners: 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!

 

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone 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
Decoding 32 bit binary streams 6 54
xyBalance chalenge 58 102
iSeries FTP Exit Program 8 162
matchUp  challenge 6 76
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

740 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