WTLVisual Studio 6Visual C++ 7.0Windows 2000Visual C++ 6.0Windows XPIntermediateDevVisual StudioWindowsC++
Pablo van der Meer's CAboutCtrl class ported to WTL






4.29/5 (4 votes)
Sep 8, 2002

47485

1052
This control can be used as an about box for your WTL applications
Description
The original CAboutCtrl
class, which is written in MFC, is made up out of three parts:
- A background image
- Scrolling credits
- Rotating flying logo
Usage
To use the class in your application do the following:
- Insert AboutCtrl.h into your project.
- Place a picture control on your dialog.
- Add a member variable for that picture control:
- In your dialog's constructor set text for the credits:
- Subclass the picture control in the message handler corresponding to
WM_INITDIALOG
:
CAboutCtrl m_AboutCtrl;
CString strCredits = "\tCAboutCtrl Example\n\n" "\rProgrammed by:\n" "Pablo van der Meer\n\n" "\rPorted to WTL by Ma Weida\n\n" "\rSpecial thanks to:\nwww.codeproject.com\n\n" "\rCopyright ?2002\n\rPablo Software Solutions\n" "\rAll right reserved.\n\n" "http:\\www.pablovandermeer.nl\n"; m_AboutCtrl.SetCredits(strCredits);
m_AboutCtrl.SubclassWindow(GetDlgItem(IDC_ABOUT_CTRL));
Original Article
Pablo van der Meer's original article can be found here.