Get radiobutton selection
Hello all,
I'm new to NSIS and i have a startup problem that i cant understand or find a solution to it.
Using nsdialogs, i created a custom page with a radio button and i want to know if it is selected or not:

(...)
Page custom Test Validation
(...)

Function Test
nsDialogs::Create /NOUNLOAD 1018
${NSD_CreateRadioButton} ...
$Pop RadioButtonTest
nsDialogs::Show
EndFunction

In order to do that, i found that i can use SendMessage $RadioButtonTest ${BM_GETCHECK} 0 0 $sel

When i place it before the nsDialogs::Show command or in the Validation function, i get the correct value. But if i place it afther the nsDialog::Show or anywhere else in the code, i always get the value 0.

If i pop the value into $sel, shouldnt i be able to access it anywhere? What am i missing?
I can solve my problem using the Validation function, which will save the correct state in $sel, but i would like to understand why do i get this behaviour.