-
Moving a child window
how would i make it so that you can click and drag a child window or something with a bitmap on it to reposition it inside that window?
i am using "windows.h" api to do it.
would i create a static and put a bitmap on it or should i make it in wm_paint with a paintstruct?
or is there another way to do it. i am just needing to move it, i dont need to resize it or anything.
any help would be greatly appreciated.
-
Uraldor's method is excellent.
edit: put your static 'image' control with the bitmap inside another control/window. This should give the effect of being able to drag the image around with the minimum amount of code.
-
Well, I would use MoveWindow (), just get the size of the child window, then put it in the MoveWindow () function:
MoveWindow (hwnd, cxPos, cyPos, cxSize, cySize, FALSE);
:þ