Home | Overviews | How Do I | Details | Sample
Feature Only in Professional and Enterprise Editions Creating a Custom AppWizard is supported only in Visual C++ Professional and Enterprise Editions. For more information, see Visual C++ Editions.
virtual void GetPlatforms( CStringList& rPlatforms );
Parameters
rPlatforms
A reference to a CStringList of each platform currently installed. Platform names that rPlatforms can contain are shown in the following table.
Platform name | Comes with |
Win32 (x86) | Visual C++ |
Win32 (MIPS) | Visual C++ RISC edition |
Win32 (ALPHA) | Visual C++ RISC edition |
Win32 (PowerPC) | Visual C++ RISC edition |
Remarks
The GetPlatforms member function allows you to specify which operating-system and hardware platforms your custom AppWizard will support. MFCAPWZ.DLL calls this function with a list containing an entry for each platform currently installed. You override GetPlatforms to parse and modify this list. Typically, you will remove those platform names from the list that your custom AppWizard does not support.
The MFC AppWizard calls GetPlatforms after loading and initializing a custom AppWizard. It uses the platform names in rPlatforms, which are always in English, to determine which platform names will appear in your custom AppWizard’s Platforms checklist. For each English name in rPlatforms, the MFC AppWizard places a locale-specific platform name into your custom AppWizard’s Platforms checklist.
For each platform selected by the custom AppWizard user, MFCAPWZ.DLL sets a corresponding target macro in the dictionary and removes those for the nonselected platforms.
The following example shows how to traverse a platforms list and remove all strings that don’t start with “Win32”, thus keeping the Intel® Win32, MIPS Win32, and ALPHA Win32 as target platforms.
// This custom AppWizard only targets Win32 platforms
void CSampleAppWiz::GetPlatforms(CStringList& rPlatforms)
{
POSITION pos = rPlatforms->GetHeadPosition();
while (pos != NULL)
{
POSITION posCurr = pos;
CString strPlatform=rPlatforms->GetNext(pos);
if (strPlatform.Left(5) != _T("Win32"))
rPlatforms->RemoveAt(posCurr);
}
}
If you do not override GetPlatforms, MFCAPWZ.DLL will display the names of all of the currently loaded platforms in the Platforms checklist.
See Also Class Members, target macro, The Dictionary