Download demo project - 149 Kb
The standard Tip of the Day dialog that comes as a Visual C++ component looks pretty poor. Also, one of my biggest complaints about Tip of the Day dialogs is that you can not get a more detailed explanation of a tip through the help system. This dialog provides a Tip of the Day dialog with improved appearance, as well as context senstivie help support for each tip.
This Improved Tip Dialog has the following features:
How to Use the Dialog
- The dialog appearance is improved.
- You can add a help context number for each tip. If there is a context number, the "Tell Me More" button is enabled. If the user clicks on the "Tell Me More" button, the program executes WinHelp for that context number. If there is no number for the tip, the "Tell Me More" button is disabled.
- You can provide a different caption for each tip.
- You can provide footnote for each tip.
- If you use a standard tip file (ASCII text), you get the default Tip dialog behavior, so you don't have to support the extra features if you don't want to.
It is a little tricky to get this dialog into your project. The best thing to do is insert the standard Tip dialog component that comes with VC++, and then replace it with this Tip dialog. This way, VC++ will add the required menu items for you.
- Insert the standard VC++ Tip dialog into your project.
- Replace the standard TipDlg.cpp and TipDlg.h files with the files from this project.
- Write your tip file. The Tip file starts as a standard ASCII text tip file, but each line uses tabs to separate the different items for each tip. There are four items on each line, each separated by a tab character. The first item on each line is the tip text. The second item is the caption. The third item is the footnote. The fourth item is the help context number. Only the first item is required.
- Place your tip file in the same directory as your program executable.
Bob Pittenger is founder and President of Starpoint Software Inc. He holds a B.A. degree from Miami University, M.S. and Ph.D. degrees from Purdue University, and an MBA from Xavier University. He has been programming since 1993, starting with Windows application development in C++/MFC and moving to C# and .NET around 2005 and is a .NET Microsoft Certified Professional Developer.
Bob is the author of two books:
Billionaire: How the Ultra-Rich Built Their Fortunes Through Good and Evil and What You Can Learn from Them
Wealthonomics: The Most Important Economic and Financial Concepts that Can Make You Rich Fast.
Visit http://www.billionairebook.net for more information.