From: Brian S. <xue...@us...> - 2007-07-29 16:16:27
|
Update of /cvsroot/popfile/windows/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3223 Modified Files: Tag: b0_22_2 pfidiag.nsi Log Message: Take the size of the details view window into account when scrolling to bring the important part of the "simple" report into view. Index: pfidiag.nsi =================================================================== RCS file: /cvsroot/popfile/windows/test/pfidiag.nsi,v retrieving revision 1.8.4.7 retrieving revision 1.8.4.8 diff -C2 -d -r1.8.4.7 -r1.8.4.8 *** pfidiag.nsi 5 May 2007 12:28:07 -0000 1.8.4.7 --- pfidiag.nsi 29 Jul 2007 16:16:26 -0000 1.8.4.8 *************** *** 104,108 **** ;-------------------------------------------------------------------------- ! !define C_VERSION "0.1.5" !define C_OUTFILE "pfidiag.exe" --- 104,108 ---- ;-------------------------------------------------------------------------- ! !define C_VERSION "0.1.6" !define C_OUTFILE "pfidiag.exe" *************** *** 1608,1611 **** --- 1608,1612 ---- !define C_LVM_GETITEMCOUNT 0x1004 !define C_LVM_ENSUREVISIBLE 0x1013 + !define C_LVM_COUNTPERPAGE 0x1028 #-------------------------------------------------------------------------- *************** *** 1628,1634 **** Function ScrollToShowPaths ! !define L_TEMP $R9 ! !define L_TOPROW $R8 ; item index of the line we want to be at the top of the window Push ${L_TEMP} Push ${L_TOPROW} --- 1629,1637 ---- Function ScrollToShowPaths ! !define L_DLG_ITEM $R9 ; the dialog item we are going to manipulate ! !define L_TEMP $R8 ! !define L_TOPROW $R7 ; item index of the line we want to be at the top of the window + Push ${L_DLG_ITEM} Push ${L_TEMP} Push ${L_TOPROW} *************** *** 1639,1649 **** ; this is the information most users will want to find first). StrCpy ${L_TOPROW} 9 ; index of the blank line immediately before "Current UserName" ! ; Check how many 'details' lines there are ! FindWindow ${L_TEMP} "#32770" "" $HWNDPARENT ! GetDlgItem ${L_TEMP} ${L_TEMP} 0x3F8 ; This is the Control ID of the details view ! SendMessage ${L_TEMP} ${C_LVM_GETITEMCOUNT} 0 0 ${L_TEMP} ; No point in trying to display a non-existent line --- 1642,1663 ---- ; this is the information most users will want to find first). + FindWindow ${L_DLG_ITEM} "#32770" "" $HWNDPARENT + GetDlgItem ${L_DLG_ITEM} ${L_DLG_ITEM} 0x3F8 ; This is the Control ID of the details view + + ; Check how many lines can be shown in the details view + + SendMessage ${L_DLG_ITEM} ${C_LVM_COUNTPERPAGE} 0 0 ${L_TEMP} + + ; The important information for the simple report is held in rows 10 to 19 (starting from 0) + + StrCpy ${L_TOPROW} 10 ; index of the "Current UserName" row in the simple report + IntCmp ${L_TEMP} 10 getrowcount getrowcount StrCpy ${L_TOPROW} 9 ; index of the blank line immediately before "Current UserName" ! getrowcount: ! ; Check how many 'details' lines there are in the report ! ! SendMessage ${L_DLG_ITEM} ${C_LVM_GETITEMCOUNT} 0 0 ${L_TEMP} ; No point in trying to display a non-existent line *************** *** 1653,1664 **** ; Scroll up (in effect) to show Current UserName, Program folder & User Data folder entries ! FindWindow ${L_TEMP} "#32770" "" $HWNDPARENT ! GetDlgItem ${L_TEMP} ${L_TEMP} 0x3F8 ; This is the Control ID of the details view ! SendMessage ${L_TEMP} ${C_LVM_ENSUREVISIBLE} ${L_TOPROW} 0 exit: Pop ${L_TOPROW} Pop ${L_TEMP} !undef L_TEMP !undef L_TOPROW --- 1667,1678 ---- ; Scroll up (in effect) to show Current UserName, Program folder & User Data folder entries ! SendMessage ${L_DLG_ITEM} ${C_LVM_ENSUREVISIBLE} ${L_TOPROW} 0 exit: Pop ${L_TOPROW} Pop ${L_TEMP} + Pop ${L_DLG_ITEM} + !undef L_DLG_ITEM !undef L_TEMP !undef L_TOPROW |