65.9K
CodeProject is changing. Read more.
Home

Pablo van der Meer's CAboutCtrl class ported to WTL

starIconstarIconstarIconstarIcon
emptyStarIcon
starIcon

4.29/5 (4 votes)

Sep 8, 2002

viewsIcon

47486

downloadIcon

1052

This control can be used as an about box for your WTL applications

Sample Image

Description

The original CAboutCtrl class, which is written in MFC, is made up out of three parts:

  1. A background image
  2. Scrolling credits
  3. Rotating flying logo
I have ported it to WTL for my shareware. All functionality has been kept.

Usage

To use the class in your application do the following:

  1. Insert AboutCtrl.h into your project.
  2. Place a picture control on your dialog.
  3. Add a member variable for that picture control:
  4. CAboutCtrl m_AboutCtrl; 
  5. In your dialog's constructor set text for the credits:
  6. 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);
    
  7. Subclass the picture control in the message handler corresponding to WM_INITDIALOG:
  8. m_AboutCtrl.SubclassWindow(GetDlgItem(IDC_ABOUT_CTRL));

Original Article

Pablo van der Meer's original article can be found here.