void JXToolBar::AppendButton ( JXTextMenu* menu, const JCharacter* id ) { JIndex index; if (menu->ItemIDToIndex(id, &index)) { AppendButton(menu, index); } }
int CTaskDialog::AddButtons(int x, int y, int /* cx */) { // add custom buttons for (DWORD cButton = 0; cButton < config_.cButtons; cButton++) { AppendButton(config_.pButtons[cButton].pszButtonText, config_.pButtons[cButton].nButtonID, x, y); x += cx_spacing; } // add common buttons if (config_.dwCommonButtons & TDCBF_OK_BUTTON) { AppendButton(HeapResString(GetBaseModule().GetResourceInstance(), MAKEINTRESOURCEW(IDOK)), IDOK, x, y); x += cx_spacing; } if (config_.dwCommonButtons & TDCBF_YES_BUTTON) { AppendButton(HeapResString(GetBaseModule().GetResourceInstance(), MAKEINTRESOURCEW(IDYES)), IDYES, x, y); x += cx_spacing; } if (config_.dwCommonButtons & TDCBF_NO_BUTTON) { AppendButton(HeapResString(GetBaseModule().GetResourceInstance(), MAKEINTRESOURCEW(IDNO)), IDNO, x, y); x += cx_spacing; } if (config_.dwCommonButtons & TDCBF_RETRY_BUTTON) { AppendButton(HeapResString(GetBaseModule().GetResourceInstance(), MAKEINTRESOURCEW(IDRETRY)), IDRETRY, x, y); x += cx_spacing; } if (config_.dwCommonButtons & TDCBF_CANCEL_BUTTON) { AppendButton(HeapResString(GetBaseModule().GetResourceInstance(), MAKEINTRESOURCEW(IDCANCEL)), IDCANCEL, x, y); x += cx_spacing; } if (config_.dwCommonButtons & TDCBF_CLOSE_BUTTON) { AppendButton(HeapResString(GetBaseModule().GetResourceInstance(), MAKEINTRESOURCEW(IDCLOSE)), IDCLOSE, x, y); x += cx_spacing; } return cy_button; }