When are you calling this code in your application? You may need to put this in your application's ReadyToRun() function instead of in the constructor. Also, I do not know how the deskbar behaves with a BView that is not 16 by 16 pixels. In my application I use only B_FOLLOW_NONE, B_WILL_DRAW for the last two parameters of the BView so you could try that as well. -Brian On Jan 27, 2011, at 5:17 PM, Robert Stiehler wrote: > Hi, > > i'am developing a App which try's to add a icon to the Deskbar. For this i > try to add a "empty" BView to the Deskbar with AddItem. In BeOS R5 it works > and i see a white square in the Deskbar. In Haiku i get the error Message > "name not fount" (printed by strerror(...) related to the return code of > AddItem). Knows someone what i have to change so that it works in Haiku like > in BeOS R5? > > My code which does not what i want ;) > > BRect rect(0, 0, 18 - 1, 15); > int32 DeskbarIconId; > BView *IconView = new BView(rect, "Deskbar Icon test", > B_FOLLOW_ALL_SIDES, B_WILL_DRAW | B_PULSE_NEEDED | B_FRAME_EVENTS); > BDeskbar *Deskbar = new BDeskbar(); > > status_t err = Deskbar->AddItem(IconView, &DeskbarIconId); > > if (err != B_OK) { > BAlert *alert = new BAlert(NULL, strerror(err), "OK"); > alert->Go(NULL); > } > > > Gruß > Robert Stiehler