?
Solved

Need Help in Customizing Common Dialog Box , WIN API

Posted on 2006-11-13
4
Medium Priority
?
258 Views
Last Modified: 2010-04-01
My teacher gave me a project that i have to write a program like Notepad , but he also request when i use File->Open , there is a preview in that Open Dialog to view the Text file that i selected . I know that i must Customize the Common Dialog but the truth is i don't know where to start .
I've told that i have to define again the template in Fileopen.dlg . But my questions are :
1/when i define it again , what about all the function that it provide ? Example like GetOpenFileName , how can i reuse it ?
2/How can i add the Preview section in that Dialog box that can view text file ?
I just need the idea to do it. Thanks for reading .
0
Comment
Question by:darkangel2007
[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
  • 2
  • 2
4 Comments
 
LVL 5

Accepted Solution

by:
NickGeorghiou earned 375 total points
ID: 17930435
0
 

Author Comment

by:darkangel2007
ID: 17935586
thank you Nick . I think that link will help . But i need a little help : how can i display the content of the selected text in the preview section . Can you please tell me ?
0
 
LVL 5

Expert Comment

by:NickGeorghiou
ID: 17935655
Hi darkangel2007,

You will need to create a custom template. Refer to the "Explorer-Style Custom Templates" section in the link I have provided. In your custom template you will need to add a control to display the preview in.

What is that you need to preview? Do you need to show some of the text that is in the text file?

If so you can probably us a static text control in your template. Whenever the selected text is changed you will then need to capture this event and check if you can open the file as a text file. Read in some lines and display them in the static text control...

I am not sure if this is exactly what is intended by preview??

Regards,
Nick

0
 

Author Comment

by:darkangel2007
ID: 17938368
Yes , it is . And i'll try it . Thanks again .
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
Suggested Courses

777 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