bool VDUIDialogPlugins::OnCommand(uint32 id, uint32 extcode) { switch(id) { case IDC_CONFIGURE: { ListItem *item = static_cast<ListItem *>(mList.GetSelectedItem()); if (item && item->HasConfigure()) { item->Configure(mhdlg); } } return true; case IDC_ABOUT: { ListItem *item = static_cast<ListItem *>(mList.GetSelectedItem()); if (item && item->HasAbout()) { item->About(mhdlg); } } return true; } return false; }
void VDUIDialogPlugins::OnItemSelectionChanged(VDUIProxyListView *source, int index) { ListItem *item = static_cast<ListItem *>(mList.GetSelectedItem()); EnableControl(IDC_ABOUT, item && item->HasAbout()); EnableControl(IDC_ABOUT, item && item->HasConfigure()); }