|
|
|
|
#1 |
|
Member
Join Date: Apr 2011
Posts: 56
|
Help Button
Please can you help me,
i need to add a Help Button, and in my Result i need to have a window (.ini), i have a solution HelpButton::show /NOUNLOAD "232,231" "Help" "Dialog" "/file=C:\NSIS\.....\file.ini" wrap 20 but i hve in result the .ini in lines no a window. how can i change the HelpButton.dll to display my file.ini. think you |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
The window only displays text. You can't have it showing a custom page. If you want to have a custom page with help information on it, either put it in another executable and extract and run it or add a custom page and only show it when your help button is pressed (don't need HelpButton for this).
Stu |
|
|
|
|
|
#3 |
|
Major Dude
|
I dont entirely understand but isn't there possibility to create dialog with nsDialogs?
Cool looking installers with custom design: www.graphical-installer.com Create Setup Pages easily: www.install-designer.com Build installers in Visual Studio 2005-2022: www.visual-installer.com or RAD Studio 2009 - 11 Alexandria: www.rad-installer.com |
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Oct 2007
Location: Shanghai, China
Posts: 207
|
You can use nsWindows, it could create dialog box.
Contact me: 137729898@qq.com |
|
|
|
|
|
#5 |
|
Member
Join Date: Apr 2011
Posts: 56
|
think for your answers,
but my problem is "how could I call a page from a help button that will contain components such as GroupBox and Label". Please help me |
|
|
|
|
|
#6 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
http://nsis.sourceforge.net/Go_to_a_NSIS_page
In your help page's show function, call Abort if $ShowHelp != 1. Also ensure you reset $ShowHelp to 0 when you leave the help page. The only issue really is that when you enter the help page, the back or next buttons won't take you back to where you were when you clicked the Help button. For that reason to be honest it'd be easier to have a pop-up. Stu |
|
|
|
|
|
#7 |
|
Member
Join Date: Apr 2011
Posts: 56
|
Re
Hi, in fact am little bit confused here, the pop-up you mentioned earlier you mean a message_box or a whole custom page? cause this last one always ,as you know ,contains the three useless button, (next,back and cancel ).
thnks |
|
|
|
|
|
#8 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
If you want a custom page pop-up, use nsWindows (as mentioned already) which is a modified version of nsDialogs. The other option as I said would be to bundle another NSIS EXE which has one custom page and extract and run that (probably messier than nsWindows).
Stu |
|
|
|
|
|
#9 |
|
Senior Member
Join Date: Oct 2007
Location: Shanghai, China
Posts: 207
|
Create a pop-up dialog with web control, list view and tree view with checkboxes.
See this example script. Contact me: 137729898@qq.com |
|
|
|
|
|
#10 |
|
Member
Join Date: Apr 2011
Posts: 56
|
thx
think you for your help, its working
, i can finally have my custom Dialog .thx |
|
|
|
|
|
#11 |
|
Member
Join Date: Apr 2011
Posts: 56
|
button to close
Please i need a button to close my custom popup , and return to the origin page.
i create the button, but i have a problem with the event to add on to close. can you help me please? thx |
|
|
|
|
|
#12 |
|
Member
Join Date: Apr 2011
Posts: 56
|
hi, please i use the help button , but i have a problem,
when I click in my help button I lost my parent page and I have a other page, how can I still in my parent Page. my parent page is a custom page. I use this code : when i click in my button help i call "CreateHelpButton" Function CreateHelpButton nsDialogs::Create 1018 Pop $0 StrCmp $0 error 0 +2 Abort call CreateCustomDialog nsDialogs::Show FunctionEnd Function CreateCustomDialog Pop $0 nsWindows::Create $0 0 ${WS_VISIBLE}|${WS_SYSMENU}|${WS_CAPTION} "Help dialog" 1018 Pop $1 ${NSW_SetWindowSize} $1 500 350 ${NSW_CenterWindow} $1 $HWNDPARENT StrCmp $1 error 0 +2 Abort EnableWindow $0 0 ${NSW_CreateGroupBox} 3% 4% 90% 10% "blabal" Pop $R0 ${NSW_CreateLabel} 8% 8% 70% 5% "blabal" Pop $R1 ${NSW_CreateGroupBox} 3% 19% 90% 10% "blabal" Pop $R2 ${NSW_CreateLabel} 8% 23% 70% 5% "blabal" Pop $R3 ${NSW_CreateGroupBox} 3% 34% 90% 10% "blabal" Pop $R4 ${NSW_CreateLabel} 8% 38% 70% 5% "blabal" Pop $R5 ${NSW_CreateGroupBox} 3% 49% 90% 10% "blabal" Pop $R6 ${NSW_CreateLabel} 8% 53% 70% 5% "blabal" Pop $R7 ${NSW_CreateGroupBox} 3% 64% 90% 10% "blabal" Pop $R8 ${NSW_CreateLabel} 8% 68% 70% 5% " blabal" Pop $R9 ${NSW_CreateButton} 50% 84% 10% 5% "OK" Pop $R1 ${NSW_OnClick} $R1 CloseCustomDialog nsWindows::Show FunctionEnd Function CloseCustomDialog SendMessage $1 ${WM_CLOSE} 0 0 FunctionEnd |
|
|
|
|
|
#13 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Send WM_CLOSE to the window (the handle returned from ::Create) using SendMessage.
Stu |
|
|
|
|
|
#14 |
|
Senior Member
Join Date: Oct 2007
Location: Shanghai, China
Posts: 207
|
In this example I use $0 multiple times for dialog handle and other controls. If you want to send message to dialog handle, make sure the value of the variable for dialog's handle in dialog creation function is always the same, use the variable only once.
nsWindows::Create $HWNDPARENT 0 ${WS_VISIBLE}|${WS_SYSMENU}|${WS_CAPTION} "Pop-up dialog" 1018 Pop $0 # handle of dialog If you use $0 for dialog handle, the variable wouldn't be used again in all event funtions of controls on this dialog. I think you should know. Contact me: 137729898@qq.com |
|
|
|
|
|
#15 |
|
Member
Join Date: Apr 2011
Posts: 56
|
re
hi,
please, I still can not find how to leave the window and return to the calling page via the button .I need your help. thx. |
|
|
|
|
|
#16 |
|
Member
Join Date: Apr 2011
Posts: 56
|
hi,
please, I still can not find how to leave the window and return to the calling page via the button . I need your help. thx. |
|
|
|
|
|
#17 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
In your button event use:
SendMessage $handle ${WM_CLOSE} 0 0 Where $handle has been mentioned already. Stu |
|
|
|
|
|
#18 |
|
Member
Join Date: Apr 2011
Posts: 56
|
re
Hi
I try to do this for my close button Function help ${NSW_CreateButton} 50% 84% 10% 5% "OK" Pop $R1 ${NSW_OnClick} $R1 CloseCustomDialog nsWindows::Show FunctionEnd Function CloseCustomDialog SendMessage $HWNDPARENT ${WS_CLOSE} 0 0 FunctionEnd and it's still not working ![]() Please help me. |
|
|
|
|
|
#19 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
It's WM_CLOSE not WS_CLOSE. Where did you get WS_CLOSE from? You should be seeing a compiler warning "unknown variable/constant "{WS_CLOSE}" detected, ignoring" if you haven't defined WS_CLOSE. Don't ignore ANY compiler warnings.
Stu |
|
|
|
|
|
#20 |
|
Member
Join Date: Apr 2011
Posts: 56
|
re
if i use ${WM_Close} , i will close the window for help and the parnet window ...
|
|
|
|
|
|
#21 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
That's because you're using $HWNDPARENT which is a handle to the NSIS window. You want the handle returned from nsWindow::Create as we have already explained.
Stu |
|
|
|
|
|
#22 |
|
Member
Join Date: Apr 2011
Posts: 56
|
re
thx for your answers, now i can close my Dialog.
juste my problem is how retur to the parent window? I have a custom page, when i click in my help button i lost my custom page , she disappears. how could I stay on the same custom page during the call and help when I close my dialog? can you help me please. |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|