Well, I have made some efforts.
I created two BView object called BackView and FrontView. Each of them has different bitmap to display (BackPic, FrontPic).
BackPic:

FrontPic:

I put FrontPic on BackPic and FrontPic has a transparent background. These images were made by WoderBrush in Haiku.
As my program starts it uses alpha channel but main problem is the backgorund. I supposed that background picture would be BackPic for FrontPic but desktop got background! I cannot imagine how could be happened. I have some screenshots:


My code is here:
#include “MainWindow.h”
#include <Application.h>
#include <Bitmap.h>
#include <TranslationUtils.h>
#include <View.h>
#include <Entry.h>
#include <File.h>
#include <Path.h>
class FrontView : public BView
{
public:
FrontView();
void Draw(BRect);
BBitmap *FrontPic;
};
class BackView : public BView
{
public:
BackView();
void Draw(BRect);
BBitmap *BackPic;
};
FrontView::FrontView()
: BView(BRect(0, 0, 200, 100), “BackView”, B_FOLLOW_NONE, B_WILL_DRAW)
{
FrontPic = BTranslationUtils::GetBitmapFile(“/boot/home/Projects/X3/minta2.png”);
}
void FrontView::Draw(BRect)
{
DrawBitmap(FrontPic);
}
BackView::BackView()
: BView(BRect(0, 0, 200, 200), “BackView”, B_FOLLOW_NONE, B_WILL_DRAW)
{
BackPic = BTranslationUtils::GetBitmapFile(“/boot/home/Projects/X3/minta1.png”);
}
void BackView::Draw(BRect)
{
DrawBitmap(BackPic);
}
FrontView *fv;
BackView *bv;
MainWindow::MainWindow(void)
: BWindow(BRect(100, 100, 500, 400), “Main Window”, B_TITLED_WINDOW, B_ASYNCHRONOUS_CONTROLS)
{
fv = new FrontView();
bv = new BackView();
fv->SetDrawingMode(B_OP_ALPHA);
fv->SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_OVERLAY);
fv->SetViewColor(B_TRANSPARENT_32_BIT);
bv->AddChild(fv);
AddChild(bv);
}
void MainWindow::MessageReceived(BMessage *msg)
{
switch (msg->what)
{
default:
{
BWindow::MessageReceived(msg);
break;
}
}
}
bool MainWindow::QuitRequested(void)
{
be_app->PostMessage(B_QUIT_REQUESTED);
return true;
}
How can I fix this problem?