Click to See Complete Forum and Search --> : Repositing controls


chris95219
December 2nd, 2006, 08:50 PM
Hi, im kinda new here and had a quick question. Im pretty sure that it is done with SendMessage(), but am not sure what message to send.

How would i reposition a control, ONLY based on its handle?

and also, if anyone has a link to control manipulations..?

That'd be great. Thanks.

wildfrog
December 2nd, 2006, 09:04 PM
Take a look at SetWindowPos (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/setwindowpos.asp) or MoveWindow (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/movewindow.asp).

- petter

chris95219
December 2nd, 2006, 10:12 PM
thanks.

Calculator
December 3rd, 2006, 04:21 AM
You might also consider DeferWindowPos if you are repositioning many (or any, or something. I dunno. This has been an example of rhyming gone bad) controls.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/deferwindowpos.asp