Solved

Need Help in Customizing Common Dialog Box , WIN API

Posted on 2006-11-13
4
253 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 125 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

Industry Leaders: 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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

729 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