Old 21st December 2013, 16:23   #1
stass
Senior Member
 
Join Date: Nov 2012
Posts: 145
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?
stass is offline   Reply With Quote
Old 22nd December 2013, 03:28   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,914
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

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 23rd December 2013, 07:09   #3
stass
Senior Member
 
Join Date: Nov 2012
Posts: 145
And who could write such a plugin ?
stass is offline   Reply With Quote
Old 24th December 2013, 23:35   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,914
Quote:
Originally Posted by stass View Post
And who could write such a plugin ?
People that have a need for windows without titlebars?

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 25th December 2013, 07:47   #5
stass
Senior Member
 
Join Date: Nov 2012
Posts: 145
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 ...
stass is offline   Reply With Quote
Old 25th December 2013, 21:00   #6
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,914
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...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 26th December 2013, 02:53   #7
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,914
Did not do much testing, use with care:
Quote:
Function .onGuiInit
MoveAnywhere::Hook
FunctionEnd
Attached Files
File Type: zip MoveAnywhere.zip (914 Bytes, 208 views)

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 26th December 2013, 06:32   #8
stass
Senior Member
 
Join Date: Nov 2012
Posts: 145
Anders, you are a magician ! Everything works. Thank you so much !
stass is offline   Reply With Quote
Old 28th December 2013, 03:30   #9
ZmAn3
Senior Member
 
Join Date: Oct 2003
Posts: 178
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
ZmAn3 is offline   Reply With Quote
Old 28th December 2013, 05:22   #10
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,914
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)

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 29th December 2013, 21:06   #11
ZmAn3
Senior Member
 
Join Date: Oct 2003
Posts: 178
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 is offline   Reply With Quote
Old 5th January 2014, 18:07   #12
ZmAn3
Senior Member
 
Join Date: Oct 2003
Posts: 178
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


code:
${NSD_CreateBitmap} 0 0 100% 100%


you can't drag from it but if you use

code:
nsDialogs::CreateControl STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS}|${SS_BITMAP} 0 0 0 109u 193u ""


then it works fine
ZmAn3 is offline   Reply With Quote
Old 30th August 2016, 10:37   #13
monkeypirate83
Junior Member
 
Join Date: Aug 2016
Posts: 4
Hey Anders,

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

Thanks a Million.
monkeypirate83 is offline   Reply With Quote
Old 8th June 2018, 16:52   #14
MyPC8MyBrain
Member
 
Join Date: Nov 2015
Posts: 96
Thumbs up

@echo on

same here!
AMAZING!!!

why is this not part of NSIS native dll stack?

Thank you Anders <3

ATB
Chris
MyPC8MyBrain is offline   Reply With Quote
Old 18th June 2018, 05:39   #15
T.Slappy
Major Dude
 
T.Slappy's Avatar
 
Join Date: Jan 2006
Location: Slovakia
Posts: 520
Send a message via ICQ to T.Slappy
Amazing! I had no idea about this plugin.

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

Cool looking skinned Graphical Installers: www.graphical-installer.com
I offer NSIS scripting, C/C++/C#/Delphi programming: www.unsignedsw.com
Develop NSIS projects in Visual Studio 2005-2017: www.visual-installer.com
or RAD Studio 2009, 2010, XE-10.2 Tokyo: www.rad-installer.com
T.Slappy is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump