NsDialogs UserData

From NSIS Wiki

[edit] Description

This header is an extension to the existing nsDialogs.nsh header file, and adds the ability to use the UserData commands of the nsDialogs plugin with the more user-friendly ${NSD_*} syntax.

[edit] Header

This header is very small and is presented here directly:

!macro NSD_SetUserData hwnd data
	nsDialogs::SetUserData ${hwnd} ${data}
!macroend
!define NSD_SetUserData `!insertmacro NSD_SetUserData`
 
!macro NSD_GetUserData hwnd outvar
	nsDialogs::GetUserData ${hwnd}
	Pop ${outvar}
!macroend
!define NSD_GetUserData `!insertmacro NSD_GetUserData`

[edit] Usage

${NSD_SetUserData} <hwnd> <data>
${NSD_GetUserData} <hwnd> <outvar>
donate
ads