No announcement yet.

Add icons by using nsdialog

  • Filter
  • Time
  • Show
Clear All
new posts

  • Add icons by using nsdialog

    Hi everyone,

    I try to add the icon by using ${NSD_CreateIcon} but I don't know how to set/load the icon that can show in the dialog. I see the nsdialog has the NSD_SetImage but not for Icon. Here is sample code

    nsDialogs::Create /NOUNLOAD 1018

    ${NSD_CreateLabel} 0 0 100% 24u $R1
    Pop $R1

    ${NSD_CreateRadioButton} 30u 50u -30u 8u $R2
    Pop $R2
    ${NSD_OnClick} $R2 function_check_leave

    ${NSD_CreateIcon} 5u 60u 100% 100% $Icon
    Pop $Icon
    ${NSD_SetImage} $Icon $PLUGINSDIR\Contrib\Graphics\Icon\nisi1-uninstall.ico $IconHandle

    Thank you!

  • #2
    I am not sure what should NSD_CreateIcon do...
    My new location


    • #3
      I'm too. I see the nsdialog manual let us create the icon by using ${NSD_CreateIcon}. It does not mention how to load the icon, but the ${NSD_CreateImage} does. Has Anyone have any way to display the icon before radiobutton? Thank you!
      Below is the part of the manual about NSD_Create*

      ${NSD_Create*} x y width height text

      Create a new control in the current dialog. A dialog must exist for this to work, so nsDialogs::Create must be called prior to this function.

      Available variants:

      Returns the new dialog's HWND on the stack or error.


      • #4
        I couldn't find any example of NSD_CreateIcon, however, if you want to display a small graphics before radiobutton, you could use NSD_CreateBitmap.
        My new location