Announcement

Collapse
No announcement yet.

nsWindows plugin for NSIS

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • nsWindows plugin for NSIS

    this plugin is modified on nsDialogs, support for window in nsis.

    Most of it's macro is the same with nsDialogs, you just need to replace ${NSD_macro} with ${NSW_macro} in your script.

    note: if you want to create more than one window at the same time, you need nsWindows.nsh, copy nsWindows.dll to nsis's plugins Directory, and replace "nsWindows::function" with "${nsWindows}::function" in your script.

    Attached Files
    Last edited by zhfi; 21 March 2009, 09:33.

  • #2
    see blow.
    Last edited by zhfi; 3 April 2009, 12:52.

    Comment


    • #3
      this is the fixed version of nsWindows.
      the plugins, nsh head files and some examples were compressed in the nsWindows.7z documents.

      a simple nsWindows's page examples like this:

      ;handle to window 3
      var hwindow3

      Function nsWindowsPage3
      IsWindow $hwindow3 Create_End
      ${NSW_CreateWindow} $hwindow3 "WND 3" 1018
      ;set window pos
      ; ${NSW_SetWindowPos} $hwindow3 0 0
      ;set window size
      ${NSW_SetWindowSize} $hwindow3 200 100

      ${NSW_CenterWindow} $hwindow3 $hwndparent

      ;call back function of window 3
      ${NSW_OnBack} OnBack3

      ${NSW_CreateButton} 50 -30 50 18u 'WND 1'
      Pop $R0
      ${NSW_OnClick} $R0 nsWindowsPage1

      ${NSW_CreateButton} 100 -30 50 18u 'WND 2'
      Pop $R0
      ${NSW_OnClick} $R0 nsWindowsPage2

      ${NSW_Show}
      Create_End:
      ShowWindow $hwindow3 ${SW_SHOW}
      FunctionEnd

      Function OnBack3
      ${NSW_DestroyWindow} $hwindow3
      FunctionEnd
      Attached Files

      Comment


      • #4
        Some thing improved for NSIS of Ansi version.
        Attached Files

        Comment


        • #5
          Some thing improved for NSIS of Unicode version.
          Attached Files

          Comment


          • #6
            source code for the plugin is here:

            Comment


            • #7
              ifififi.svn.sourceforge.net/viewvc/ifififi/nsWindows/

              Comment


              • #8
                Veru good plugin! Picks you up!
                Contact me: [email protected]

                Comment


                • #9
                  How to remove Titlebar from nsWindows??

                  I used nsWindows as custom messagebox, it works perfectly.

                  Now i want to remove the Titlebar. but not finding a way to do it.
                  Can anybody suggest how to achieve this..??

                  Please find attachment
                  Attached Files

                  Comment


                  • #10
                    After compiling have a message:

                    Variable "insWindows" not referenced or never set, wasting memory!
                    What does this mean and what can be done?

                    Comment


                    • #11
                      Originally Posted by stass View Post
                      What does this mean and what can be done?
                      It means exactly what is says.

                      Remove "Var insWindows" from the code...
                      IntOp $PostCount $PostCount + 1

                      Comment


                      • #12
                        In my code, these variables - no. But they are in nsWindows.nsh.
                        What exactly should be removed there - I do not know ... Tell me please.
                        Here - nsWindows.nsh three options: http://www.mediafire.com/?dp3oo7427u2gptc

                        Comment


                        • #13
                          Are you calling NSW_CreateWindow?
                          IntOp $PostCount $PostCount + 1

                          Comment


                          • #14
                            Originally Posted by Anders View Post
                            Are you calling NSW_CreateWindow?
                            Yes, for example:
                            outfile "nsWindows-test.exe"
                            !include "nsWindows.nsh"
                            Section
                            ${NSW_SetWindowSize} $HWNDPARENT 700 300
                            SectionEnd

                            Comment


                            • #15
                              Originally Posted by stass View Post
                              Yes, for example:
                              I said NSW_CreateWindow! That size function is just a helper function and you could look at it's code and make your own version that uses SetWindowPos if that is the only thing in that nsh that you are actually using.
                              IntOp $PostCount $PostCount + 1

                              Comment

                              Working...
                              X