home *** CD-ROM | disk | FTP | other *** search
/ Hackers Magazine 57 / CdHackersMagazineNr57.iso / Software / Programming / nsis-2.46-setup.exe / Docs / StartMenu / Readme.txt
Encoding:
Text File  |  2008-12-12  |  2.2 KB  |  47 lines

  1. StartMenu.dll shows a custom page that lets the user select a start menu program 
  2. folder to put shortcuts in.
  3.  
  4. To show the dialog use the Select function. This function has one required parameter 
  5. which is the program group default name, and some more optional switches:
  6.   /autoadd - automatically adds the program name to the selected folder
  7.   /noicon - doesn't show the icon in the top left corner
  8.   /text [please select...] - sets the top text to something else than
  9.                              "Select the Start Menu folder in which..."
  10.   /lastused [folder] - sets the edit box to a specific value folder.
  11.                        Use this to make this plug-in remember the last
  12.                        folder selected by the user
  13.   /checknoshortcuts text - Shows a check box with the text "text". If
  14.                            the user checks this box, the return value
  15.                            will have > as its first character and you
  16.                            should not create the program group.
  17.   /rtl - sets the direction of every control on the selection dialog
  18.          to RTL. This means every text shown on the page will be
  19.      justified to the right.
  20.  
  21. The order of the switches doesn't matter but the required parameter must come after
  22. all of them. Every switch after the required parameter will be ignored and left
  23. on the stack.
  24.  
  25. The function pushes "success", "cancel" or an error to the stack. If there was no
  26. error and the user didn't press on cancel it will push the selected folder name
  27. after "success". If the user checked the no shortcuts checkbox the result will be
  28. prefixed with '>'. The function does not push the full path but only the selected
  29. sub-folder. It's up to you to decide if to put it in the current user or all
  30. users start menu.
  31.  
  32. To set properties of the controls on the page, such as colors and fonts use Init
  33. and Show instead of Select. Init will push the HWND of the page on the stack,
  34. or an error string. For example:
  35.  
  36. StartMenu::Init "Test"
  37. Pop $0
  38. IntCmp $0 0 failed
  39. GetDlgItem $0 $0 1003
  40. SetCtlColors $0 "" FF0000
  41. StartMenu::Show
  42. # continue as with Select here
  43. failed:
  44.  
  45. Look at Example.nsi for a full example (without Init and Select).
  46.  
  47. Created by Amir Szekely (aka KiCHiK)