Click to See Complete Forum and Search --> : Starting an image processing project


ashsri
November 4th, 2004, 11:03 AM
Hi all,

This is a very basic question....I wanted to know whether to select Dialog Based option for the project or Single document. And also how to display an image in the dialog based environment from a file in the directory. Please help me...I really need this very urgent.

Thanks

MrViggy
November 4th, 2004, 11:30 AM
This is probably not the best forum for this question. Are you considering an MFC based app? Also, do you want to open one image at a time, or multiple images? Do you need a "windowed" based app (i.e. do you want multiple views)?

If all of the above are "no" then a dialog based app is probably the easiest to work with, in that you won't have to deal with the docment/view archetecture. Of course, this is assuming that you app it really simple (in that you don't want menus; toolbars; status bars; etc.).

Viggy

ashsri
November 4th, 2004, 11:38 AM
Hi,

I want to open one image at a time using the OPEN FILE from the TOOLBAR. I will be having TOOL BAR, Menu's.... Please do help me.

Thanks

MrViggy
November 4th, 2004, 11:46 AM
Well, you can still have toolbars and menus in a dialog (or a dialog based app). But, you have to hand code a lot of the messaging. I would suggest an SDI or MDI app instead. Yeah there is a little more overhead, but all the toolbar/menu command routing (and command UI routing) are already handled for you.

Also, drawing is a little easier, in that you can handle it all in your CView class (in OnPaint). Depending on how you want to draw your image, you can just paint the entire view, part of the view, etc.

As far as displaying an image, you need to load it somehow. Since there are many formats, there are just as many ways to load an image. Check out GDI+. It's pretty nice for handling the loading and saving of a few formats (JPEG, TIFF, BMP):

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdicpp/GDIPlus/aboutGDIPlus.asp

Without any more information (or specific code), that's about all I can say...

Viggy