Skip to content
⌘ NSIS Forum Archive

Moving controls

6 posts

bradharding#

Moving controls

Hi!

Without using a resource editor to mess with the UI resource files, what I'm trying to do is move the branding text control downwards so it is along the bottom of the window adjacent to the back/next/cancel buttons. Now, is it actually possible to move a control by code? I've tried the following:

GetDlgItem $0 $HWNDPARENT 1028
SendMessage $0 ${WM_MOVE} 100 100
Any suggestions?

Thanks in advance.

Brad.
Afrow UK#
It'd be much easier to modify IDD 105 of the UI with Resource Hacker. You only have to modify that dialogue, and no others.

-Stu
bradharding#
Thanks for your response!

I agree - it certainly would be easier doing it that way, but it's a method I'd prefer avoiding. Is it possible using code, though? And if so, how?

Brad.
bradharding#
Thanks.

On your suggestion, here's what I've tried:

GetDlgItem $1 $HWNDPARENT 1028
System::call "user32::SetWindowPos(i r1, i -1, i 100, i 100, i 0, i 0, i 0x0001) i.r1"
But it has no effect whatsoever.

I have no idea what I'm doing... 😛 Any chance of an example?

Regards,
Brad.
bradharding#
For those who care, I worked out what to do:

GetDlgItem $0 $HWNDPARENT 1028
System::Call 'User32::SetWindowPos(i, i, i, i, i, i, i) b ($0, 0, ${X}, ${Y}, 0, 0, 0x0001)'
Might be of interest to someone...

Brad.