void plMultistageBehComponent::CreateRollups() { plComponent::CreateRollups(); fDlg = GetCOREInterface()->AddRollupPage(hInstance, MAKEINTRESOURCE(IDD_COMP_MULTIBEH), IStaticDlgProc, "Multistage Behavior", (LPARAM)this); IInitDlg(); ICreateStageDlg(); }
BOOL plExportDlgImp::DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) { switch (msg) { case WM_INITDIALOG: IInitDlg(hDlg); return TRUE; case WM_COMMAND: { int cmd = HIWORD(wParam); int resID = LOWORD(wParam); if (cmd == BN_CLICKED) { if (resID == IDCANCEL) { IDestroy(); return TRUE; } else if (resID == IDC_EXPORT) { IDoExport(); return TRUE; } else if (resID == IDC_PRESHADE_CHECK) { fPreshade = (IsDlgButtonChecked(hDlg, IDC_PRESHADE_CHECK) == BST_CHECKED); return TRUE; } else if (resID == IDC_PHYSICAL_CHECK) { fPhysicalsOnly = (IsDlgButtonChecked(hDlg, IDC_PHYSICAL_CHECK) == BST_CHECKED); return TRUE; } else if (resID == IDC_LIGHTMAP_CHECK) { fLightMap = (IsDlgButtonChecked(hDlg, IDC_LIGHTMAP_CHECK) == BST_CHECKED); return TRUE; } else if (resID == IDC_DIR) { // Get a new client path const char* path = plMaxConfig::GetClientPath(true); if (path) SetDlgItemText(hDlg, IDC_CLIENT_PATH, path); return TRUE; } else if (resID == IDC_RADIO_FILE || resID == IDC_RADIO_DIR) { IGetRadio(hDlg); return TRUE; } else if (resID == IDC_BROWSE_EXPORT) { plBrowseFolder::GetFolder(fExportSourceDir, fExportSourceDir, "Choose the source directory", hDlg); SetDlgItemText(hDlg, IDC_EXPORT_PATH, fExportSourceDir); return TRUE; } } else if (cmd == CBN_SELCHANGE && resID == IDC_PAGE_COMBO) { int sel = ComboBox_GetCurSel((HWND)lParam); // If the user selected a page, save it if (sel != 0 && sel != CB_ERR) ComboBox_GetText((HWND)lParam, fExportPage, sizeof(fExportPage)); // Else, clear it (export all pages) else fExportPage[0] = '\0'; return TRUE; } } break; } return FALSE; }