Changeset 46 for trunk/src/helpers/cnrh.c
- Timestamp:
- Mar 13, 2001, 9:56:01 AM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/cnrh.c
r35 r46 774 774 * 775 775 * Invoking this function on a container in Tree view 776 * will result in not much but display flickering anyway s.776 * will result in not much but display flickering anyway. 777 777 * 778 778 * This returns the number of records which were processed. … … 968 968 * 969 969 *@@changed V0.9.4 (2000-08-07) [umoeller]: now posting scroll messages to avoid sync errors 970 *@@changed V0.9.9 (2001-03-12) [umoeller]: this never worked for root records in tree view if KeepParent == TRUE, fixed 970 971 */ 971 972 … … 1001 1002 1002 1003 // query record location and size of container 1003 if (!WinSendMsg(hwndCnr, CM_QUERYRECORDRECT, &rclRecord, &qRect)) 1004 if (!WinSendMsg(hwndCnr, 1005 CM_QUERYRECORDRECT, 1006 &rclRecord, 1007 &qRect)) 1004 1008 return 1; 1005 if (!WinSendMsg(hwndCnr, CM_QUERYVIEWPORTRECT, &rclCnr, MPFROM2SHORT(CMA_WINDOW, FALSE)) ) 1009 1010 if (!WinSendMsg(hwndCnr, 1011 CM_QUERYVIEWPORTRECT, 1012 &rclCnr, 1013 MPFROM2SHORT(CMA_WINDOW, FALSE)) ) 1006 1014 return 2; 1007 1015 … … 1016 1024 if (KeepParent) 1017 1025 { 1018 if (!WinSendMsg(hwndCnr, CM_QUERYCNRINFO, (MPARAM)&CnrInfo, (MPARAM)sizeof(CnrInfo))) 1026 if (!WinSendMsg(hwndCnr, 1027 CM_QUERYCNRINFO, 1028 (MPARAM)&CnrInfo, 1029 (MPARAM)sizeof(CnrInfo))) 1019 1030 return 4; 1020 1031 else … … 1036 1047 MPFROM2SHORT(CMA_PARENT, 1037 1048 CMA_ITEMORDER)); 1038 qRect2.fsExtent = fsExtent; 1039 1040 // now query PARENT record location and size of container 1041 if (!WinSendMsg(hwndCnr, CM_QUERYRECORDRECT, &rclParentRecord, &qRect2)) 1042 return 5; 1043 1044 ptlParentRecord.x = (rclParentRecord.xLeft); 1045 ptlParentRecord.y = (rclParentRecord.yTop); 1046 // ptlParentRecord.x = (rclParentRecord.xLeft + rclParentRecord.xRight) / 2; 1047 // ptlParentRecord.y = (rclParentRecord.yBottom + rclParentRecord.yTop) / 2; 1048 rclCnr2 = rclCnr; 1049 WinOffsetRect(hab, &rclCnr2, 0, -lYOfs); 1050 // if ( (rclParentRecord.yBottom - rclRecord.yBottom) > (rclCnr.yTop - rclCnr.yBottom) ) 1051 if (!(WinPtInRect(hab, &rclCnr2, &ptlParentRecord))) 1049 if (qRect2.pRecord) // V0.9.9 (2001-03-12) [umoeller] 1052 1050 { 1053 lYOfs = (rclCnr.yTop - rclParentRecord.yTop) // this would suffice 1054 - (rclRecord.yTop - rclRecord.yBottom); // but we make the previous rcl visible too 1051 qRect2.fsExtent = fsExtent; 1052 1053 // now query PARENT record location and size of container 1054 if (!WinSendMsg(hwndCnr, CM_QUERYRECORDRECT, &rclParentRecord, &qRect2)) 1055 return 5; 1056 1057 ptlParentRecord.x = (rclParentRecord.xLeft); 1058 ptlParentRecord.y = (rclParentRecord.yTop); 1059 // ptlParentRecord.x = (rclParentRecord.xLeft + rclParentRecord.xRight) / 2; 1060 // ptlParentRecord.y = (rclParentRecord.yBottom + rclParentRecord.yTop) / 2; 1061 rclCnr2 = rclCnr; 1062 WinOffsetRect(hab, &rclCnr2, 0, -lYOfs); 1063 // if ( (rclParentRecord.yBottom - rclRecord.yBottom) > (rclCnr.yTop - rclCnr.yBottom) ) 1064 if (!(WinPtInRect(hab, &rclCnr2, &ptlParentRecord))) 1065 { 1066 lYOfs = (rclCnr.yTop - rclParentRecord.yTop) // this would suffice 1067 - (rclRecord.yTop - rclRecord.yBottom); // but we make the previous rcl visible too 1068 } 1055 1069 } 1056 1070 }
Note:
See TracChangeset
for help on using the changeset viewer.