Problem while setting focus on Textbox of Custome Page
;My custome Page
Page custom organisation_id_pre organisation_id_leave
;In pre function diplaying page & getting handel to it.
function organisation_id_pre
strcmp $ALREADY_INSTALLED "YES" 0 +2
abort
!insertmacro MUI_HEADER_TEXT "Required Information" "Please enter following required information"
InstallOptions::Dialog "$PLUGINSDIR\Organisation_id.ini"
Pop $HWND_org_id
functionend
;In leave function i'm reading ini file verifying it if error i want to set focu of perticular textbox .
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
abort
${EndIf}
${If} $1 > '255'
WriteINIStr "$PLUGINSDIR\Organisation_id.ini" 'Field 3' 'Flags' 'FOCUS'
messagebox mb_ok "IP address not valid"
abort
${EndIf}
${if} $2 > '255'
WriteINIStr "$PLUGINSDIR\Organisation_id.ini" 'Field 4' 'Flags' 'FOCUS'
messagebox mb_ok "IP address not valid"
abort
${EndIf}
${if} $3 > '255'
WriteINIStr "$PLUGINSDIR\Organisation_id.ini" 'Field 4' 'Flags' 'FOCUS'
messagebox mb_ok "IP address not valid"
abort
${EndIf}
strcpy $ip_addr "$0.$1.$2.$3"
ReadINIStr $org_id "$PLUGINSDIR\Organisation_id.ini" 'Field 1' "State"
WriteINIStr "$PLUGINSDIR\default_preferences.ini" 'Field 8' 'state' "$org_id"
flushini "$PLUGINSDIR\default_preferences.ini"
ReadINIStr $port "$PLUGINSDIR\Organisation_id.ini" 'Field 6' "State"
functionend
;Not working can anyone help Am i doing something wrong?