On 2009-11-25 at 08:22:01 [+0100], pete.goodeve@xxxxxxxxxxxx wrote: > On Tue, Nov 24, 2009 at 04:40:30PM -0800, I wrote: > > OK, I'm lost again... (:-/) > > > > I sort of assumed that as Icon-O-Matic created rdef files, and rdef > > byte arrays are used for supplying BeOS-type icon data, that to make > > the midi_server supply a vector icon, all I had to do was put the array > > from the rdef file into the message that it places in the endpoint > > (without the bitmap creation step) and use BIconUtils::GetVectorIcon() > > on that data at the other end to get a bitmap. However, GetVectorIcon > > just tells me that the data should be a "flat icon"! I can find > > nothing about converting rdef into flat icon... > > And now I'm even more baffled... I just looked at Philippe's new mods to > midi_server, and he does almost *exactly* what I tried, except that he is > using GetVectorIcon locally (on the same rdef data), and apparently it > works just as I thought it would! (He puts the raw data into the > message, too, just as I was, but it isn't actually used by anyone else > yet.) > > I suppose I did something stupid, but I checked that what I was receiving > in the message appeared to be correct. I'll reinvestigate tomorrow. > > (BTW, GetVectorIcon didn't actually say what I reported above -- it gave > two error messages [that I don't have handy) which seemed to indicate > -- with looking at the IconUtils source -- that it needed a flattened > message.) Hm. There is a Icon-O-Matic "native" document format, which is stored as flattened BMessage. However, this is not what the BIconUtils want. They want the "flat" HVIF icon data. Icon-O-Matic supports exporting that in various forms, but it's always the same data. I.e. "Source Code" writes the same data as "RDef" does, just with different syntax. So I am not sure what you did exactly, but if you exported RDef, I presume you put this in the application resources and load it like Philippe did in his recent commit. If you used the export Source Code method, then you just pass the C array to BIconUtils. If in doubt, just post your code snippet here. :-) Best regards, -Stephan