Important alert: (current site time 7/15/2013 6:26:42 PM EDT)
 

winzip icon

Common dialog with Image preview:

Email
Submitted on: 3/11/2003 8:36:53 AM
By: Farouk W Akl 
Level: Advanced
User Rating: By 14 Users
Compatibility: Microsoft Visual C++
Views: 27501
author picture
 
     This is a simple common dialog with an image preview utility like the one with Photoshop and paint shop pro... This example uses the _PICTURE_ class which I created to help me using different image formats in c++ like the one in VB The class is based upon another one written in MFC which was posted on codeguru I think , but this one is made small and easy with simple APIs..Enjoy

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.

Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments
3/11/2003 3:57:48 PM

Good work although didn't try it with XP
(If this comment was disrespectful, please report it.)

 
3/11/2003 6:54:08 PMFarouk Akl

if you liked the code please vote for it
(If this comment was disrespectful, please report it.)

 
3/12/2003 3:22:09 AM

Fine work ! A little - not so important - bug: if You check and uncheck the "Don't show preview"-box, the first selected file is not previewed
With regards
(If this comment was disrespectful, please report it.)

 
3/12/2003 6:29:55 AMFarouk Akl

ok,I'll solve this in an update version
thanx
(If this comment was disrespectful, please report it.)

 
5/7/2003 12:14:19 PM

Hi! I've been trying to use _PICTURE_ class to show a picture on a dialog (like you do on the preview) but I've found some problems. Do you have a different sample how to use this class simply to show a figure on a dialog window ? Thanks in advance!
(If this comment was disrespectful, please report it.)

 
3/19/2004 10:30:30 AMAlok Gupta

thank you for great code i am trying to find oding for jpeg and other format in vc++ for far many days
5 globe from me

(If this comment was disrespectful, please report it.)

 
4/1/2004 11:26:01 AM

Hi. Could you tell me why I have some errors when I try to compile your program? Errors in linking (I think)like this: ImageBrowse.obj : error LNK2001: unresolved external symbol "public: int __thiscall _PICTURE_::DrawPicture(struct HDC__ *,long,long,long,long)" (?DrawPicture@_PICTURE_@@QAEHPAUHDC__@@JJJJ@Z)

Thanks

(If this comment was disrespectful, please report it.)

 
6/27/2004 3:06:44 PMAJ1

Could you do a small demo on how to use this in a vc++6 mfc dialog based program? Or give me a little info on the subject? Your demo program works perfectly. I have tried to use this in mfc but my program crashes if I run it with this line in //ofn.Flags=OFN_EXPLORER | OFN_ENABLEHOOK | OFN_ENABLETEMPLATE |OFN_HIDEREADONLY; Without it I get no picture preview dialog box.


Thanks,
AJ
(If this comment was disrespectful, please report it.)

 
12/9/2004 6:28:26 PM

I am a beginner with visual c++, can you tell how can i insert into my proyect. Thanks
(If this comment was disrespectful, please report it.)

 
9/7/2005 1:13:36 AMSpectre5

Wow...great job with this...I've been looking for something just like this. Thanks a lot and GREAT job!
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.