- 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());
+ {
+ char rbuf[3];
+ DecToHex( (unsigned char)(key >> 16), rbuf );
+ char gbuf[3];
+ DecToHex( (unsigned char)(key >> 8), gbuf );
+ char bbuf[3];
+ DecToHex( (unsigned char)(key), bbuf );
+ sprintf( tmpbuf, "\"%s c #%s%s%s\",\n", sym, rbuf, gbuf, bbuf );
+ }
+ stream.Write( tmpbuf, strlen(tmpbuf) );