- tmp.Printf(wxT("\"%s c #%s%s%s\",\n"), sym,
- wxDecToHex((unsigned char)(key >> 16)).c_str(),
- wxDecToHex((unsigned char)(key >> 8)).c_str(),
- wxDecToHex((unsigned char)(key)).c_str());
- stream.Write(tmp.mb_str(), tmp.Length());
+ {
+ wxByte r = wxByte(key >> 16);
+ wxByte g = wxByte(key >> 8);
+ wxByte b = wxByte(key);
+ sprintf(tmpbuf, "\"%s c #%02X%02X%02X\",\n", sym, r, g, b);
+ }
+ stream.Write( tmpbuf, strlen(tmpbuf) );