void KviConfigurationFile::writeEntry(const QString & szKey,const QColor &clr) { m_bDirty = true; KviConfigurationFileGroup * p_group = getCurrentGroup(); KviCString szData(KviCString::Format,"%d,%d,%d,%d",clr.red(),clr.green(),clr.blue(),clr.alpha()); p_group->replace(szKey,new QString(szData.ptr())); }
STDMETHODIMP CECR::PrintBarcode(BSTR FirmID, BYTE nPrintText, BSTR wszData, LONG* ErrorCode) { CW2A szData(wszData); m_ECRList.Win1251ToCP866(szData); BYTE nPrintBuffer[255]; DWORD dwBufferSize; dwBufferSize = 0; memset(nPrintBuffer, 0, 255); // позиционирование по центру nPrintBuffer[dwBufferSize++] = 0x1B; nPrintBuffer[dwBufferSize++] = 'a'; nPrintBuffer[dwBufferSize++] = 1; // высота штрих-кода nPrintBuffer[dwBufferSize++] = 0x1D; nPrintBuffer[dwBufferSize++] = 'h'; nPrintBuffer[dwBufferSize++] = 70; // ширина кода nPrintBuffer[dwBufferSize++] = 0x1D; nPrintBuffer[dwBufferSize++] = 'w'; nPrintBuffer[dwBufferSize++] = 2; // цифры nPrintBuffer[dwBufferSize++] = 0x1D; nPrintBuffer[dwBufferSize++] = 'H'; nPrintBuffer[dwBufferSize++] = 2; // штрих-код nPrintBuffer[dwBufferSize++] = 0x1D; nPrintBuffer[dwBufferSize++] = 'k'; nPrintBuffer[dwBufferSize++] = 0x43; nPrintBuffer[dwBufferSize++] = 0x0C; // данные memcpy(nPrintBuffer + dwBufferSize, szData, 12); dwBufferSize += 12; InitCmd(); // команда to_numeric(237, m_Cmd, 3, m_Len); //PRINTBARCODE // пароль to_char(OPERATOR_PASSWD, m_Cmd + m_Len, 4, m_Len); // устройство to_numeric(0, m_Cmd + m_Len, 1, m_Len); // текст to_bchar((char *)nPrintBuffer, m_Cmd + m_Len, dwBufferSize, m_Len); CopyMemory(CommandBuffer[CommandBufferLen++], m_Cmd, m_Len); return S_OK; }