0
我正在使用以下代碼將背景圖像設置爲面板。但沒有任何東西被設置爲背景。我是否正確地做事?如何爲面板,表單或容器設置背景圖像?如何將背景圖像設置爲Bada 2.0中的面板
Panel* pBgPanel = new Panel;
pBgPanel->Construct(*pLayout, Rectangle(10, 10, 320, 320));
AddControl(*pBgPanel);
Image bgImage;
bgImage.Construct();
Osp::Graphics::Bitmap * bgBitmap;
bgBitmap = bgImage.DecodeN(L"/Home/bg.png", BITMAP_PIXEL_FORMAT_ARGB8888);
Canvas* pCanvas = pBgPanel->GetCanvasN();
pCanvas->DrawBitmap(*(new Point(0,0)),*bgBitmap);
pCanvas->Show();