void plExportDlgImp::IInitDlg(HWND hDlg)
{
    // Set the client path
    const char* path = plMaxConfig::GetClientPath(false, true);
    SetDlgItemText(hDlg, IDC_CLIENT_PATH, path);

    // Set the preshade button
    CheckDlgButton(hDlg, IDC_PRESHADE_CHECK, fPreshade ? BST_CHECKED : BST_UNCHECKED);
    CheckDlgButton(hDlg, IDC_PHYSICAL_CHECK, fPhysicalsOnly ? BST_CHECKED : BST_UNCHECKED);
    CheckDlgButton(hDlg, IDC_LIGHTMAP_CHECK, fLightMap ? BST_CHECKED : BST_UNCHECKED);

    char buf[256];
    sprintf(buf, "Last export took %d:%02d", fLastExportTime/60, fLastExportTime%60);
    SetDlgItemText(hDlg, IDC_LAST_EXPORT, buf);

    SetWindowPos(hDlg, NULL, fXPos, fYPos, 0, 0, SWP_NOSIZE | SWP_NOZORDER);

    //
    // Get the names of all the pages in this scene and put them in the combo
    //
    HWND hPages = GetDlgItem(hDlg, IDC_PAGE_COMBO);
    ComboBox_AddString(hPages, kAllPages);

    bool foundPage = false;

    CompSet comps;
    GetPagesRecur((plMaxNode*)GetCOREInterface()->GetRootNode(), comps);
    for (CompSet::iterator it = comps.begin(); it != comps.end(); it++)
    {
        const char* page = LocCompGetPage(*it);
        if (page)
        {
            int idx = ComboBox_AddString(hPages, page);
            if (!strcmp(page, fExportPage))
            {
                foundPage = true;
                ComboBox_SetCurSel(hPages, idx);
            }
        }
    }

    if (!foundPage)
    {
        fExportPage[0] = '\0';
        ComboBox_SetCurSel(hPages, 0);
    }

    CheckRadioButton(hDlg, IDC_RADIO_FILE, IDC_RADIO_DIR, IDC_RADIO_FILE);
    IGetRadio(hDlg);

    SetDlgItemText(hDlg, IDC_EXPORT_PATH, fExportSourceDir);
}