void CHistoryPane::Push(const CHistoryItem & a) { CItem item; BITMAP bitmap; _double f; a.image->GetBitmap(&bitmap); f = m_uWidth / (_double)bitmap.bmWidth; ((CHistoryItem&)item) = a; item.w = bitmap.bmWidth; item.h = bitmap.bmHeight; item.h0 = bitmap.bmHeight * f; item.sel0 = a.sel * f; item.image0 = new CBitmap; item.image0->Attach(BitmapCreate(m_uWidth, item.h0)); { CDC dc; CRect r(0,0,m_uWidth, item.h0); dc.CreateCompatibleDC(0); dc.SelectObject(item.image0); BitmapBlt(&dc, &r, item.image, 0); } m_vItems.push_back(item); RedrawWindow(); while (CanScrollDown()) Down(); }
Surface::Surface(const unsigned int width, const unsigned int height, const PIXEL_FORMAT bpp): surfaceWidth(width), surfaceHeight(height), pixelFormat(bpp), pixelData(NULL) { this->bmpFile = BitmapCreate(width, height, bpp); this->pixelData = this->bmpFile->Data; }
void SG_CreateInputAmbiMap(int length) { InputAmbiMap = BitmapCreate(length+1); }