Bild scrollen
-
Hi,
ich lade eine Bitmap in ein Fenster. Doch wenn das Bitmap zu groß ist will ich das man scrollen kann um das ganze Bild zu sehen. Welche Funktione benötige ich dafür?
thx
-
BOOL BitBlt( HDC hdcDest, // handle to destination device context int nXDest, // x-coordinate of destination rectangle?s upper-left corner int nYDest, // y-coordinate of destination rectangle?s upper-left corner int nWidth, // width of destination rectangle int nHeight, // height of destination rectangle HDC hdcSrc, // handle to source device context int nXSrc, // x-coordinate of source rectangle?s upper-left corner int nYSrc, // y-coordinate of source rectangle?s upper-left corner DWORD dwRop // raster operation code );
über nXSrc, nYSrc, nWidth, nHeight kopierst Du einen Ausschnitt des Bildes, sprich den sichtbaren Teil, auf den Bildschirm. Scrollen entspricht dem Erhöhen/Verringern von nXSrc bzw. nYSrc.
Flying away...
-
Ach, ScrollWindow() wäre auch noch eine Idee, vielleicht ist die Funktion etwas schneller. Aber die freiwerdende Stelle mußt Du auf jeden Fall wieder kopieren.
sublimiere...