Skip to content
⌘ NSIS Forum Archive

How to move a window without a title ?

15 posts

stass#

How to move a window without a title ?

How to move a window without a title ? That is, move the window from any point ?
Nobody in NSIS SO does not make ... How to implement it in practice?
Anders#
What is NSIS SO?

You need to write a plugin that subclasses $hwndparent and maybe the inner dialog as well and fake WM_NCHITTEST to return HTCAPTION
Anders#
Originally Posted by stass View Post
And who could write such a plugin ?
People that have a need for windows without titlebars?
stass#
The main task - to the window can be moved - at any point.

Move a window by its title - just not convenient.

Window without a title looks more original than the standard dull window.

Often need to move the window only if the hotkey is pressed.

No plugin can not do ...
Anders#
You are asking for things that Windows does not provide out of the box so you have to write custom code to get what you want.

This pretty much means you have to learn C/C++ or Delphi or pay someone to write it for you...
Anders#
Did not do much testing, use with care:
Function .onGuiInit
MoveAnywhere::Hook
FunctionEnd
ZmAn3#
haha asked for something like this a year ago just had to wait a while i guess, is this just hooking the hard coded controls in the base ui ? I'm asking because sometimes I add my own image controls with resource hacker and was wondering if it would work on those.

Thanks 🙂
Anders#
It should work on any dialog (it ignores all controls except progress bar but static controls probably return HTTRANSPARENT and so it might work on them as well)
ZmAn3#
nice thank you, now ill I need is a way to make a progress bar with flat colors on a os with themes and hover or mouse enter macros in nsdialogs 😉
ZmAn3#
Just a fyi for some reason this does not work on controls created via the nsd macros so if you where to make a background image via


${NSD_CreateBitmap} 0 0 100% 100%
you can't drag from it but if you use

nsDialogs::CreateControl STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS}|${SS_BITMAP} 0 0 0 109u 193u ""
then it works fine
monkeypirate83#
Hey Anders,

that DLL is amazing, exactly what I was looking for.

Thanks a Million. 🙂
MyPC8MyBrain#
@echo on

same here!
AMAZING!!!

why is this not part of NSIS native dll stack?

Thank you Anders <3

ATB
Chris
T.Slappy#
Amazing! I had no idea about this plugin.

@Anders: Can you share the sources and make this plugin official (wiki)?