CUSTOMWZ: A Custom AppWizard

CUSTOMWZ is an example of a custom AppWizard, which contains features that the standard AppWizard does not provide.

When creating a new application, you can use AppWizard to quickly generate the starter files you need for the most common application types. But for special applications that are unique to your work, you can create custom AppWizards.

Custom AppWizards are useful for creating generic application project types that can repetitively generate common functionality — application types that can be used multiple times. Custom AppWizards are not useful for creating one-off project types.

Like AppWizard, a custom AppWizard presents the user with choices, tracks their decisions, and uses those decisions to generate the code, resources, and project files that the Visual C++ build tools require to build a skeletal, working application.

For example, if you work for a company whose employees commonly need special views of database information, you can create a custom AppWizard to generate generic dialog-based front ends to a database. You can even ensure that the dialog box is always embellished with a company logo.

Possibilities for custom AppWizards include:

  • Creating a custom AppWizard that is based on the code and resources in an existing project

  • Modifying code in existing AppWizard templates

  • Adding one or more steps to the existing AppWizard’s steps

  • Creating a custom set of steps

For more information on creating a custom AppWizard, see .

This sample demonstrates the following keywords:

AfxFormatString1; AfxMessageBox; AfxThrowUserException; CBitmap::LoadBitmap; CDC::BitBlt; CDC::CreateCompatibleDC; CDC::DPtoLP; CDC::FillRect; CDC::SelectObject; CDialog::MapDialogRect; CFileDialog::DoModal; CFileDialog::GetPathName; CGdiObject::GetObject; CListBox::AddString; CListBox::GetItemData; CListBox::GetSelCount; CListBox::GetSelItems; CListBox::SelItemRange; CListBox::SetItemData; CListBox::SetSel; CStdioFile::ReadString; CString::Find; CString::Format; CString::GetBuffer; CString::Left; CString::LoadString; CString::MakeLower; CString::Mid; CString::ReleaseBuffer; CloseHandle; CreateFile; CreateFileMapping; EnableWindow; FindClose; FindFirstFile; FindNextFile; GetDlgItem; GetFileAttributes; GetFileSize; GetWindowText; MapViewOfFile; RedrawWindow; SetWindowText; UnmapViewOfFile; sscanf