How to edit selected part of an image?

Is t here a way in CPP to edit only a selected part of an image? In Photoshop you just have to make a selection (mask), choose pointer tool and then you can move, rotate, scale... this part of the bitmap. I can't find a similar solution in CPP. Thank you in advance!