Changing Images using Install Options
How can I change an image of an image control (the images are the same size) in an Install Options page after selecting a radiobutton with NOTIFY flag? (means in run-time)
36 posts
System::Call "${sysDeleteObject} (R1) .R2"
MessageBox MB_OK $R2
System::Call '${sysLoadImage} (0, s, ${IMAGE_BITMAP}, 0, 0, ${LR_CREATEDIBSECTION}|${LR_LOADFROMFILE}) .R1' "$0\$1.bmp"
SendMessage $0 ${STM_SETIMAGE} ${IMAGE_BITMAP} $R1The MessageBox should show a non-zero result as MSDN says, but I put the right image handle, field 16 (before have only labels, textboxes, checkboxes and groupboxes):What is wrong?[Field 16]
Type=Bitmap
Text=C:\Games\C-evo\HAL.bmp
State="C:\Games\C-evo\HAL.bmp"
Left=257
Right=300
Top=3
Bottom=43
Thanks Joost. NSIS is really the best. 👍!define BM_SETCHECK 0x00F1 # Message
!define BST_UNCHECKED 0x0000
!define BST_CHECKED 0x0001
!define BST_INDETERMINATE 0x0002
SendMessage $0 ${BM_SETCHECK} ${BST_CHECKED} ""
# Replace ${BST_CHECKED} with one of those "BST_" you want (uncheck, check or gray/check).
Are you planning to add this "variable support" to StrCtlColors soon? If not that soon, have another way to paint controls without StrCtlColors?
$1 = 0, means it passed. But replacing "l" with "i" gives error.!define HKEY_LOCAL_MACHINE 0x80000002
System::Call "Advapi32::RegCreateKeyA(l ${ROOT_KEY}, t 'Software/Test', i.r0) i.r1"