Changeset 1085 for trunk/src/comctl32/header.c
- Timestamp:
- Sep 28, 1999, 6:36:04 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comctl32/header.c
r968 r1085 1 /* $Id: header.c,v 1. 9 1999-09-18 12:21:25cbratschi Exp $ */1 /* $Id: header.c,v 1.10 1999-09-28 16:36:04 cbratschi Exp $ */ 2 2 /* 3 3 * Header control … … 21 21 * HEADER_DrawItem. 22 22 * - Little flaw when drawing a bitmap on the right side of the text. 23 * 24 * Status: Development in progress 25 * Version: Unknown 23 26 */ 24 27 … … 36 39 #define VERT_BORDER 4 37 40 #define DIVIDER_WIDTH 10 41 #define MIN_ITEMWIDTH 0 38 42 39 43 #define HEADER_GetInfoPtr(hwnd) ((HEADER_INFO *)GetWindowLongA(hwnd,0)) … … 426 430 oldRop = SetROP2 (hdc, R2_XORPEN); 427 431 MoveToEx (hdc, x, rect.top, NULL); 428 LineTo (hdc, x, rect.bottom -1);432 LineTo (hdc, x, rect.bottom); 429 433 SetROP2 (hdc, oldRop); 430 434 SelectObject (hdc, hOldPen); … … 1263 1267 if (HEADER_SendHeaderNotify (hwnd, HDN_ITEMCHANGINGA, infoPtr->iMoveItem)) 1264 1268 infoPtr->items[infoPtr->iMoveItem].cxy = infoPtr->nOldWidth; 1265 else { 1269 else 1270 { 1266 1271 nWidth = pt.x - infoPtr->items[infoPtr->iMoveItem].rect.left + infoPtr->xTrackOffset; 1267 if (nWidth < 0) 1268 nWidth = 0; 1269 infoPtr->items[infoPtr->iMoveItem].cxy = nWidth; 1270 HEADER_SendHeaderNotify (hwnd, HDN_ITEMCHANGEDA, infoPtr->iMoveItem); 1271 } 1272 1273 HEADER_SetItemBounds (hwnd); 1274 hdc = GetDC (hwnd); 1275 HEADER_Refresh (hwnd, hdc); 1276 ReleaseDC (hwnd, hdc); 1272 if (nWidth < MIN_ITEMWIDTH) 1273 nWidth = MIN_ITEMWIDTH; 1274 1275 if (infoPtr->nOldWidth != nWidth) 1276 { 1277 RECT rect; 1278 1279 infoPtr->items[infoPtr->iMoveItem].cxy = nWidth; 1280 HEADER_SendHeaderNotify (hwnd, HDN_ITEMCHANGEDA, infoPtr->iMoveItem); 1281 1282 GetClientRect(hwnd,&rect); 1283 rect.left = infoPtr->items[infoPtr->iMoveItem].rect.right-2; 1284 HEADER_SetItemBounds (hwnd); 1285 rect.left = MIN(infoPtr->items[infoPtr->iMoveItem].rect.right-2,rect.left); 1286 InvalidateRect(hwnd,&rect,FALSE); 1287 } 1288 } 1277 1289 } 1278 1290 } … … 1344 1356 else { 1345 1357 nWidth = pt.x - infoPtr->items[infoPtr->iMoveItem].rect.left + infoPtr->xTrackOffset; 1346 if (nWidth < 0)1347 nWidth = 0;1358 if (nWidth < MIN_ITEMWIDTH) 1359 nWidth = MIN_ITEMWIDTH; 1348 1360 infoPtr->items[infoPtr->iMoveItem].cxy = nWidth; 1349 1361 HEADER_SendHeaderNotify (hwnd, HDN_ITEMCHANGEDA,
Note:
See TracChangeset
for help on using the changeset viewer.