func (il *ImageList) AddMasked(bitmap *drawing.Bitmap) (int, os.Error) { if bitmap == nil { return 0, newError("bitmap cannot be nil") } index := ImageList_AddMasked(il.hIml, bitmap.Handle(), COLORREF(il.maskColor)) if index == -1 { return 0, newError("ImageList_AddMasked failed") } return index, nil }
func (il *ImageList) Add(bitmap, maskBitmap *drawing.Bitmap) (int, os.Error) { if bitmap == nil { return 0, newError("bitmap cannot be nil") } var maskHandle HBITMAP if maskBitmap != nil { maskHandle = maskBitmap.Handle() } index := ImageList_Add(il.hIml, bitmap.Handle(), maskHandle) if index == -1 { return 0, newError("ImageList_Add failed") } return index, nil }