Solved

Edit control in a image/object editor

Posted on 1997-04-07
10
186 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

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: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

762 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

19 Experts available now in Live!

Get 1:1 Help Now