+ int zeroHeight = (r.top + r.bottom) >> 1;\r
+\r
+ // plot X and Y grid lines\r
+ if ((PlotGridX > 0) && ((PlotGridX * GraphPixelsPerPoint) > 1)) {\r
+ for(i = offset; i < r.right; i += (int)(PlotGridX * GraphPixelsPerPoint)) {\r
+ SelectObject(hdc, GreyPenLite);\r
+ MoveToEx(hdc, r.left + i, r.top, NULL);\r
+ LineTo(hdc, r.left + i, r.bottom);\r
+ }\r
+ }\r
+\r
+ if ((PlotGridY > 0) && ((PlotGridY * GraphPixelsPerPoint) > 1)){\r
+ for(i = 0; i < ((r.top + r.bottom)>>1); i += (int)(PlotGridY * GraphPixelsPerPoint)) {\r
+ SelectObject(hdc, GreyPenLite);\r
+ MoveToEx(hdc, r.left, zeroHeight + i, NULL);\r
+ LineTo(hdc, r.right, zeroHeight + i);\r
+ MoveToEx(hdc, r.left, zeroHeight - i, NULL);\r
+ LineTo(hdc, r.right, zeroHeight - i);\r
+ }\r
+ }\r