void CUIDialog::windowSetValue(int controlId, double value) { char buf[128]; sprintf(buf, "%g", value); windowSetText(controlId, buf); }
void CUIDialog::windowSetValue(int controlId, long value) { char buf[32]; sprintf(buf, "%d", value); windowSetText(controlId, buf); }
void ModelTreeDialog::swapWindowText(char oldChar, char newChar) { std::string text; windowGetText(IDC_OPTIONS, text); replaceStringCharacter(&text[0], oldChar, newChar); windowSetText(IDC_OPTIONS, text); }
void BoundingBoxDialog::updateData(void) { LDrawModelViewer *modelViewer = getModelViewer(); if (m_model != NULL && modelViewer != NULL) { UCCHAR buf1[1024]; UCCHAR buf2[1024]; modelViewer->getBoundingMin().print(buf1, COUNT_OF(buf1)); sucprintf(buf2, COUNT_OF(buf2), _UC("<%s>"), buf1); windowSetText(IDC_MIN_POINT, buf2); modelViewer->getBoundingMax().print(buf1, COUNT_OF(buf1)); sucprintf(buf2, COUNT_OF(buf2), _UC("<%s>"), buf1); windowSetText(IDC_MAX_POINT, buf2); } else { windowSetText(IDC_MIN_POINT, _UC("")); windowSetText(IDC_MAX_POINT, _UC("")); } }
void CUIDialog::windowSetText(int controlId, const std::string &text) { windowSetText(hWindow, controlId, text); }