Index: trunk/src/helpers/cctl_tooltip.c
===================================================================
--- trunk/src/helpers/cctl_tooltip.c	(revision 26)
+++ trunk/src/helpers/cctl_tooltip.c	(revision 29)
@@ -183,5 +183,5 @@
             qmsg.mp1 = mp1;
             qmsg.mp2 = mp2;
-            _Pmpf((__FUNCTION__ ": sending TTM_RELAYEVENT"));
+            // _Pmpf((__FUNCTION__ ": sending TTM_RELAYEVENT"));
             WinSendMsg(pst->hwndTooltip,
                        TTM_RELAYEVENT,
@@ -198,5 +198,5 @@
                 lstFree(G_pllSubclassedTools);
                 G_pllSubclassedTools = NULL;
-                _Pmpf((__FUNCTION__ ": removed hwnd 0x%lX", hwndTool));
+                // _Pmpf((__FUNCTION__ ": removed hwnd 0x%lX", hwndTool));
             }
             mrc = (pst->pfnwpOrig)(hwndTool, msg, mp1, mp2);
@@ -239,5 +239,5 @@
 
             lstAppendItem(G_pllSubclassedTools, pst);
-            _Pmpf((__FUNCTION__ ": subclassed hwnd 0x%lX", hwndTool));
+            // _Pmpf((__FUNCTION__ ": subclassed hwnd 0x%lX", hwndTool));
         }
     }
@@ -435,5 +435,5 @@
                     BOOL fShow)  // if TRUE: show, else: HIDE
 {
-    _Pmpf((__FUNCTION__ ": fShow %d", fShow));
+    // _Pmpf((__FUNCTION__ ": fShow %d", fShow));
     if (fShow)
     {
@@ -461,5 +461,5 @@
             // mouse not moved since timer was started:
             // find the current TOOLINFO
-            _Pmpf((__FUNCTION__ ": mouse not moved... pttd->ptiMouseOver 0x%lX", pttd->ptiMouseOver));
+            // _Pmpf((__FUNCTION__ ": mouse not moved... pttd->ptiMouseOver 0x%lX", pttd->ptiMouseOver));
             if (pttd->ptiMouseOver)
             {
@@ -477,6 +477,6 @@
             }
 
-            _Pmpf((__FUNCTION__ ": pttd->pszPaintText %s",
-                    (pttd->pszPaintText) ? pttd->pszPaintText : "NULL"));
+            // _Pmpf((__FUNCTION__ ": pttd->pszPaintText %s",
+               //      (pttd->pszPaintText) ? pttd->pszPaintText : "NULL"));
 
             if (pttd->pszPaintText)
@@ -502,31 +502,38 @@
                 cy = (rcl.yTop - rcl.yBottom) + 2*TOOLTIP_CY_BORDER;
 
-                // calc x and y pos of tooltip
-                if (    (pttd->ptiMouseOver->ulFlags & TTF_CENTERBELOW)
-                     || (pttd->ptiMouseOver->ulFlags & TTF_CENTERABOVE)
+                // calc x and y pos of tooltip:
+
+                // per default, use pointer pos
+                ptlTooltip.x = ptlPointer.x - cx/2;
+                ptlTooltip.y = ptlPointer.y - cy;
+
+                // do we need the tool's position?
+                if (    pttd->ptiMouseOver->ulFlags
+                     & (TTF_CENTER_X_ON_TOOL | TTF_POS_Y_ABOVE_TOOL | TTF_POS_Y_BELOW_TOOL)
                    )
                 {
-                    // center below control:
-                    SWP swpTool;
+                    // yes:
+                    SWP     swpTool;
+                    POINTL  ptlTool;
                     WinQueryWindowPos(pttd->ptiMouseOver->hwndTool, &swpTool);
-                    ptlTooltip.x = swpTool.x;
-                    ptlTooltip.y = swpTool.y;
+                    ptlTool.x = swpTool.x;
+                    ptlTool.y = swpTool.y;
                     // convert x, y to desktop points
                     WinMapWindowPoints(WinQueryWindow(pttd->ptiMouseOver->hwndTool,
                                                       QW_PARENT), // hwndFrom
                                        HWND_DESKTOP,            // hwndTo
-                                       &ptlTooltip,
+                                       &ptlTool,
                                        1);
-                    ptlTooltip.x += ((swpTool.cx - cx) / 2L);
-                    if (pttd->ptiMouseOver->ulFlags & TTF_CENTERBELOW)
-                        ptlTooltip.y -= cy;
-                    else
-                        ptlTooltip.y += swpTool.cy;
-                }
-                else
-                {
-                    // use pointer pos:
-                    ptlTooltip.x = ptlPointer.x - cx/2;
-                    ptlTooltip.y = ptlPointer.y - cy;
+
+                    // X
+                    if (pttd->ptiMouseOver->ulFlags & TTF_CENTER_X_ON_TOOL)
+                        // center X on tool:
+                        ptlTooltip.x = ptlTool.x + ((swpTool.cx - cx) / 2L);
+
+                    // Y
+                    if (pttd->ptiMouseOver->ulFlags & TTF_POS_Y_ABOVE_TOOL)
+                        ptlTooltip.y = ptlTool.y + swpTool.cy;
+                    else if (pttd->ptiMouseOver->ulFlags & TTF_POS_Y_BELOW_TOOL)
+                        ptlTooltip.y = ptlTool.y - cy;
                 }
 
@@ -852,5 +859,5 @@
                     case TOOLTIP_ID_TIMER_INITIAL:
                         // _Pmpf(("WM_TIMER: Stopping initial timer: %d", usTimer));
-                        _Pmpf((__FUNCTION__ ": TOOLTIP_ID_TIMER_INITIAL"));
+                        // _Pmpf((__FUNCTION__ ": TOOLTIP_ID_TIMER_INITIAL"));
                         WinStopTimer(pttd->hab,
                                      hwndTooltip,
@@ -1160,5 +1167,5 @@
                         if (pti->hwndTool == pqmsg->hwnd)
                         {
-                            _Pmpf((__FUNCTION__ ": found tool"));
+                            // _Pmpf((__FUNCTION__ ": found tool"));
                             pttd->ptiMouseOver = pti;
                             break;
@@ -1182,6 +1189,6 @@
                         memcpy(&pttd->ptlPointerLast, &ptlPointer, sizeof(POINTL));
 
-                        _Pmpf((__FUNCTION__ ": pttd->ptiMouseOver: 0x%lX", pttd->ptiMouseOver));
-                        _Pmpf((__FUNCTION__ ": pttd->fIsActive: 0x%lX", pttd->fIsActive));
+                        // _Pmpf((__FUNCTION__ ": pttd->ptiMouseOver: 0x%lX", pttd->ptiMouseOver));
+                        // _Pmpf((__FUNCTION__ ": pttd->fIsActive: 0x%lX", pttd->fIsActive));
                         if (    (pttd->ptiMouseOver)
                              && (pttd->fIsActive)
@@ -1290,5 +1297,5 @@
                     // compose values for that msg
                     TOOLTIPTEXT ttt = {0};
-                    _Pmpf(("TTM_GETTEXT: PSZ_TEXTCALLBACK... sending TTN_NEEDTEXT"));
+                    // _Pmpf(("TTM_GETTEXT: PSZ_TEXTCALLBACK... sending TTN_NEEDTEXT"));
                     ttt.hwndTooltip = hwndTooltip;
                     ttt.hwndTool = pti->hwndTool;
@@ -1521,5 +1528,5 @@
 
             case TTM_SHOWTOOLTIPNOW:
-                _Pmpf((__FUNCTION__ ": TTM_SHOWTOOLTIPNOW %d", mp1));
+                // _Pmpf((__FUNCTION__ ": TTM_SHOWTOOLTIPNOW %d", mp1));
                 TtmShowTooltip(hwndTooltip, pttd, (BOOL)mp1);
             break;
Index: trunk/src/helpers/cnrh.c
===================================================================
--- trunk/src/helpers/cnrh.c	(revision 26)
+++ trunk/src/helpers/cnrh.c	(revision 29)
@@ -1457,5 +1457,12 @@
  *      -- PRECORDCORE precc: current record core, as
  *                     determined by this func.
- *      -- ULONG ulUser: what you have specified here.
+ *      -- ULONG ulUser1/2: what you have specified here.
+ *
+ *      It must be declared as follows:
+ *
+ +          ULONG EXPENTRY fncb(HWND hwndCnr,
+ +                              PRECORDCORE precc,
+ +                              ULONG ulUser1,
+ +                              ULONG ulUser2)
  *
  *      If the callback returns anything != 0, this
@@ -1476,6 +1483,6 @@
 
 ULONG cnrhForAllRecords(HWND hwndCnr,
-                        PRECORDCORE preccParent,
-                        PFNCBRECC pfncbRecc,
+                        PRECORDCORE preccParent,    // in: NULL for root
+                        PFNCBRECC pfncbRecc,        // in: callback
                         ULONG ulUser1,
                         ULONG ulUser2)
Index: trunk/src/helpers/gpih.c
===================================================================
--- trunk/src/helpers/gpih.c	(revision 26)
+++ trunk/src/helpers/gpih.c	(revision 29)
@@ -361,7 +361,10 @@
     POINTL ptl1;
 
-    for (us = 0; us < usWidth; us++)
+    for (us = 0;
+         us < usWidth;
+         us++)
     {
         GpiSetColor(hps, lColorLeft);
+        // draw left line
         ptl1.x = rcl2.xLeft;
         ptl1.y = rcl2.yBottom;
@@ -369,9 +372,12 @@
         ptl1.y = rcl2.yTop;     // V0.9.7 (2000-12-20) [umoeller]
         GpiLine(hps, &ptl1);
+        // go right -> draw top
         ptl1.x = rcl2.xRight;   // V0.9.7 (2000-12-20) [umoeller]
         GpiLine(hps, &ptl1);
+        // go down -> draw right
         GpiSetColor(hps, lColorRight);
         ptl1.y = rcl2.yBottom;
         GpiLine(hps, &ptl1);
+        // go left -> draw bottom
         ptl1.x = rcl2.xLeft;
         GpiLine(hps, &ptl1);
