View Single Post
Old 20th March 2007, 03:46   #5
darshanaltekar
Junior Member
 
Join Date: Feb 2007
Posts: 47
SetFocus is not working can anyone tell me why?


Page custom organisation_id_pre organisation_id_leave

function organisation_id_pre
strcmp $ALREADY_INSTALLED "YES" 0 +2
abort
!insertmacro MUI_HEADER_TEXT "Required Information" "Please enter following required information"
InstallOptions:ialog "$PLUGINSDIR\Organisation_id.ini"
Pop $HWND_org_id
functionend



function organisation_id_leave
ReadINIStr $0 "$PLUGINSDIR\Organisation_id.ini" 'Field 2' "State" ;l$ip_addr "$PLUGINSDIR\Organisation_id.ini" 'Field 4' "State"
ReadINIStr $1 "$PLUGINSDIR\Organisation_id.ini" 'Field 3' "State"
ReadINIStr $2 "$PLUGINSDIR\Organisation_id.ini" 'Field 4' "State"
ReadINIStr $3 "$PLUGINSDIR\Organisation_id.ini" 'Field 5' "State"

${If} $0 > '255'
messagebox mb_ok "IP address not valid from IP field 1"
Push "$PLUGINSDIR\Organisation_id.ini" ;Page .ini file where the field can be found.
Push "$HWND_org_id" ;Page handle you got when reserving the page.
Push "2" ;Field number to set focus.
Call SetFocus
!insertmacro MUI_INSTALLOPTIONS_SHOW
; WriteINIStr "$PLUGINSDIR\Organisation_id.ini" 'Field 2' 'Flags' 'FOCUS'
; FlushINI $TEMP\something.ini
; !insertmacro MUI_INSTALLOPTIONS_READ $R1 "$PLUGINSDIR\Organisation_id.ini" "Field 2" "HWND"
; SendMessage $R1 ${WM_SETFOCUS} 0 0
; SendMessage $R1 ${WM_SETTEXT} 0 "STR:8080"
; abort
${EndIf}
darshanaltekar is offline   Reply With Quote