Well that's what I did ,basically . As you can see bellow I also have a function which makes my DIB from a DDB(the funnction is ConvertToDIB).I called this function before the SelectObject call .I don't know why I can't display the DIB (I see a white window when I try to open an image). I transformed the DDB into DIB so I can modify it (for now I don't know how to modify it , but I just want to display it first ).Here's the code : void CDoiView::OnInitialUpdate() { CScrollView::OnInitialUpdate(); CSize sizeTotal; sizeTotal.cx = sizeTotal.cy = 0; CleanUp(); CDoiDoc* pDoc = GetDocument(); CString strPath = pDoc->GetPathName(); if (!strPath.IsEmpty()) m_handlerToBMP = GetBitmapFromFile(strPath); if (m_handlerToBMP){ GetBitmapDimensionEx(m_handlerToBMP, &sizeTotal); } SetScrollSizes(MM_TEXT, sizeTotal); CDC* pDC=GetDC(); HDC hMemDC; hMemDC=CreateCompatibleDC(pDC->GetSafeHdc()); if (hMemDC) { if (m_handlerToBMP){ bool aa; if ( (aa=ConvertToDIB(m_handlerToBMP))==false ) { AfxMessageBox("eroare ConvertToDIB");} // select new bitmap into memory DC HBITMAP hOldBitmap = (HBITMAP)SelectObject(hMemDC, m_handlerToBMP); //alocam memorie pentru tabloul ce contine informatia despre culoarea pixelilor GetBitmapDimensionEx(m_handlerToBMP, &sizeTotal); //transfer din memorie in fereastra ::BitBlt(pDC->GetSafeHdc(),0,0,sizeTotal.cx,sizeTotal.cy,hMemDC,0,0,SRCCOPY); // select old bitmap back into memory DC and get handle to bitmap SelectObject(hMemDC, hOldBitmap); DeleteObject(hOldBitmap); DeleteDC(hMemDC); } Invalidate(); UpdateWindow(); } }