How to use a part of a bitmap resource ?

Is it possible to use a specific region of a bitmap resource ? For example lets say that i got a 100x20 bitmap and want to use last 25x20 pixels on a button. How should i approach this ?
Got it.

 
BitBlt(hdcDest, windowPosX, windowPosY, windowWidth, windowHeight, hdcSource, bitmapX, bitmapY, SRCCOPY);
the best approach is to copy into a DIB.. Take a look at CreateDIBSection function
you can simply extract a section by array indices. and then blt it to the screen

Last edited on
Topic archived. No new replies allowed.