Archive: Custom page with custom icons


Custom page with custom icons
Hi all.
This is my first post. I'm not really a scripter but learning. :P
I have a problem and I can't figure it out.

I use a custom page with installoptionsEx. Everything ok here.
Found in the forum a way to add icons to the header.

!packhdr "$%TEMP%\exehead.dat" 'header.cmd'

InstallOptionsEx::initDialog /NOUNLOAD "$PLUGINSDIR\User.ini"
FindWindow $R1 "#32770" ""
Pop $R1
GetDlgItem $0 $R1 1210
GetDlgItem $1 $R1 1211
System::Call 'kernel32::GetModuleFileNameA(i 0, t .R0, i 1024) i r1'
System::Call 'kernel32::GetModuleHandleA(t R0)i .r2'
System::Call 'user32::LoadImage(i r2, i 104, i ${IMAGE_ICON}, , , i ${LR_SHARED}) i.R2'
System::Call 'user32::LoadImage(i r2, i 105, i ${IMAGE_ICON}, , , i ${LR_SHARED}) i.R3'
SendMessage $0 ${STM_SETICON} $R2 0
SendMessage $1 ${STM_SETICON} $R3 0


But when showing the page the icons are very large. Out of boundairies of the ini file. The dont get the size I want them to be.

In the ini file i have this.


[Field 11]
Type=Image
Text=Image
Flags=RESIZETOFIT
Left=15
Right=31
Top=22
Bottom=40

[Field 12]
Type=Image
Text=Image
Flags=RESIZETOFIT|TRANSPARANT
Left=217
Right=238
Top=81
Bottom=97


What am I doing wrong. Did I forgot some coding.

:) I figured it out.

I had this


System::Call 'user32::LoadImage(i r2, i 104, i ${IMAGE_ICON}, , , i ${LR_SHARED}) i.R2'


and should be

System::Call 'user32::LoadImage(i r2, i 104, i ${IMAGE_ICON},i 64 ,i 64 , i ${LR_SHARED}) i.R2'