PDA

View Full Version : Hide the ShowDetails button and listBox on installfiles page?


lovespy108
21st December 2007, 01:05
I want to hide the Show Details Button and ListBox on InstallFils page with code.How to do that?

I tried to do with the following way,but failed.

GetDlgItem $0 $HWNDPARENT 1027 (or 1016)
ShowWindow $0 ${SW_HIDE}

So I did that with "Resource Hacker.exe".Though I succeeded,I meet troubles on my Uninstall.exe.I want to show the button and listbox on uninstall UI.

the pic in attachment is the result I changed the UI of install files with "Resource Hacker.exe" and some codes.

Joel
21st December 2007, 01:31
Where did you put this code:

GetDlgItem $0 $HWNDPARENT 1027
ShowWindow $0 ${SW_HIDE}

lovespy108
21st December 2007, 01:45
I put the code here:

!macro MUI_FUNCTION_INSTFILESPAGE PRE SHOW LEAVE

Function "${PRE}"
GetDlgItem $0 $HWNDPARENT 1027
ShowWindow $0 ${SW_HIDE}
.....

Joel
21st December 2007, 03:07
Because it suppose to go in SHOW.
Are you use the correct ID of the button...I'm in linux right now, can't help that much

lovespy108
21st December 2007, 03:23
The ID is correct.I want to hide the ShowDetails button and ListBox when install.and show them when uninstall.

Joel
21st December 2007, 03:37
FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $0 $0 1027
ShowWindow $0 ${SW_HIDE}

:)

lovespy108
21st December 2007, 04:01
Thank you very much.The ShowDetails button was hiden like the following way.
_______________________________________________________
!macro MUI_FUNCTION_INSTFILESPAGE PRE SHOW LEAVE

Function "${PRE}"
....
FunctionEnd

Function "${SHOW}"
;;;;put the code here;;;
FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $1 $0 1027
ShowWindow $1 ${SW_HIDE}
;;;;;;;;;;;;;;;;;;;;;;;;
!insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
FunctionEnd
____________________________________________________________

kichik
21st December 2007, 08:47
Simply use:ShowInstDetails nevershow

Joel
21st December 2007, 13:54
Originally posted by kichik
Simply use:ShowInstDetails nevershow
And where's the fun of hardcore code :rolleyes:

lovespy108
24th December 2007, 07:41
:up: :up: :up: :up: :up: :up: :up: :up: :up: :up: :D :D :D :D :D :D :D :D :D :D :D :D :D :D