Changeset 6705 for trunk/src/comctl32/pager.c
- Timestamp:
- Sep 15, 2001, 11:13:31 AM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comctl32/pager.c
r6644 r6705 1 /* $Id: pager.c,v 1.9 2001-09-05 12:05:01 bird Exp $ */2 1 /* 3 2 * Pager control … … 21 20 #include "debugtools.h" 22 21 22 DEFAULT_DEBUG_CHANNEL(pager); 23 23 24 #ifdef __WIN32OS2__ 24 25 #include "ccbase.h" 26 #undef inline 25 27 #define inline 26 28 #endif 27 28 DEFAULT_DEBUG_CHANNEL(pager);29 29 30 30 typedef struct … … 40 40 INT nPos; /* scroll position */ 41 41 INT nWidth; /* from child wnd's response to PGN_CALCSIZE */ 42 INT nHeight; /* from child wnd's response to PGN_CALCSIZE */ 42 INT nHeight; /* from child wnd's response to PGN_CALCSIZE */ 43 43 BOOL bForward; /* forward WM_MOUSEMOVE msgs to the contained wnd */ 44 44 INT TLbtnState; /* state of top or left btn */ … … 58 58 #define REPEAT_DELAY 50 59 59 60 /* the horizontal arrows are: 60 /* the horizontal arrows are: 61 61 * 62 62 * 01234 01234 … … 67 67 * 5 ** ** 68 68 * 6 * * 69 * 7 69 * 7 70 70 * 71 71 */ … … 75 75 INT x, y, w, h; 76 76 HPEN hOldPen; 77 77 78 78 w = r.right - r.left + 1; 79 79 h = r.bottom - r.top + 1; … … 108 108 } 109 109 110 /* the vertical arrows are: 110 /* the vertical arrows are: 111 111 * 112 112 * 01234567 01234567 113 * 1****** ** 113 * 1****** ** 114 114 * 2 **** **** 115 115 * 3 ** ****** … … 122 122 INT x, y, w, h; 123 123 HPEN hOldPen; 124 124 125 125 w = r.right - r.left + 1; 126 126 h = r.bottom - r.top + 1; … … 166 166 167 167 if ((rc.right - rc.left <= 0) || (rc.bottom - rc.top <= 0)) 168 return; 168 return; 169 169 170 170 hBrush = CreateSolidBrush(clrBk); … … 173 173 FillRect(hdc, &rc, hBrush); 174 174 175 if (btnState == PGF_HOT) 175 if (btnState == PGF_HOT) 176 176 { 177 177 DrawEdge( hdc, &rc, BDR_RAISEDINNER, BF_RECT); … … 181 181 PAGER_DrawVertArrow(hdc, rc, COLOR_WINDOWFRAME, topLeft); 182 182 } 183 else if (btnState == PGF_NORMAL) 183 else if (btnState == PGF_NORMAL) 184 184 { 185 185 DrawEdge (hdc, &rc, BDR_OUTER, BF_FLAT); … … 189 189 PAGER_DrawVertArrow(hdc, rc, COLOR_WINDOWFRAME, topLeft); 190 190 } 191 else if (btnState == PGF_DEPRESSED) 191 else if (btnState == PGF_DEPRESSED) 192 192 { 193 193 DrawEdge( hdc, &rc, BDR_SUNKENOUTER, BF_RECT); … … 197 197 PAGER_DrawVertArrow(hdc, rc, COLOR_WINDOWFRAME, topLeft); 198 198 } 199 else if (btnState == PGF_GRAYED) 199 else if (btnState == PGF_GRAYED) 200 200 { 201 201 DrawEdge (hdc, &rc, BDR_OUTER, BF_FLAT); … … 234 234 PAGER_GetButtonState (HWND hwnd, WPARAM wParam, LPARAM lParam) 235 235 { 236 PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd); 236 PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd); 237 237 LRESULT btnState = PGF_INVISIBLE; 238 238 INT btn = (INT)lParam; … … 251 251 PAGER_GetPos(HWND hwnd) 252 252 { 253 PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd); 253 PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd); 254 254 TRACE("[%04x] returns %d\n", hwnd, infoPtr->nPos); 255 255 return (LRESULT)infoPtr->nPos; … … 259 259 PAGER_GetButtonSize(HWND hwnd) 260 260 { 261 PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd); 261 PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd); 262 262 TRACE("[%04x] returns %d\n", hwnd, infoPtr->nButtonSize); 263 263 return (LRESULT)infoPtr->nButtonSize; … … 267 267 PAGER_GetBorder(HWND hwnd) 268 268 { 269 PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd); 269 PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd); 270 270 TRACE("[%04x] returns %d\n", hwnd, infoPtr->nBorder); 271 271 return (LRESULT)infoPtr->nBorder; … … 275 275 PAGER_GetBkColor(HWND hwnd) 276 276 { 277 PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd); 277 PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd); 278 278 TRACE("[%04x] returns %06lx\n", hwnd, infoPtr->clrBk); 279 279 return (LRESULT)infoPtr->clrBk; 280 280 } 281 281 282 static void 283 PAGER_CalcSize (HWND hwnd, INT* size, BOOL getWidth) 282 static void 283 PAGER_CalcSize (HWND hwnd, INT* size, BOOL getWidth) 284 284 { 285 285 NMPGCALCSIZE nmpgcs; … … 291 291 nmpgcs.iWidth = getWidth ? *size : 0; 292 292 nmpgcs.iHeight = getWidth ? 0 : *size; 293 SendMessageA ( hwnd, WM_NOTIFY,293 SendMessageA (GetParent (hwnd), WM_NOTIFY, 294 294 (WPARAM)nmpgcs.hdr.idFrom, (LPARAM)&nmpgcs); 295 295 … … 334 334 infoPtr->nHeight = wndSize; 335 335 336 TRACE("[%04x] SWP %dx%d at (%d,%d)\n", hwnd, 336 TRACE("[%04x] SWP %dx%d at (%d,%d)\n", hwnd, 337 337 infoPtr->nWidth, infoPtr->nHeight, 338 338 0, -nPos); … … 380 380 } 381 381 382 static void 382 static void 383 383 PAGER_GrayAndRestoreBtns(PAGER_INFO* infoPtr, INT scrollRange, 384 384 BOOL* needsResize, BOOL* needsRepaint) … … 417 417 418 418 419 static void 419 static void 420 420 PAGER_NormalizeBtns(PAGER_INFO* infoPtr, BOOL* needsRepaint) 421 421 { … … 433 433 } 434 434 435 static void 435 static void 436 436 PAGER_HideGrayBtns(PAGER_INFO* infoPtr, BOOL* needsResize) 437 437 { … … 464 464 PAGER_HideGrayBtns(infoPtr, &resizeClient); 465 465 466 if (resizeClient) /* initiate NCCalcSize to resize client wnd */ 467 SetWindowPos(hwnd, 0,0,0,0,0, 466 if (resizeClient) /* initiate NCCalcSize to resize client wnd */ { 467 SetWindowPos(hwnd, 0,0,0,0,0, 468 468 SWP_FRAMECHANGED | SWP_NOSIZE | SWP_NOMOVE | 469 469 SWP_NOZORDER | SWP_NOACTIVATE); 470 } 470 471 471 472 if (repaintBtns) 472 SendMessageA(hwnd, WM_NCPAINT, 0, 0); 473 } 474 475 static LRESULT 473 SendMessageA(hwnd, WM_NCPAINT, 0, 0); 474 } 475 476 static LRESULT 476 477 PAGER_SetPos(HWND hwnd, INT newPos, BOOL fromBtnPress) 477 478 { … … 500 501 501 502 static LRESULT 502 PAGER_HandleWindowPosChanging(HWND hwnd, W INDOWPOS *winpos)503 PAGER_HandleWindowPosChanging(HWND hwnd, WPARAM wParam, WINDOWPOS *winpos) 503 504 { 504 505 PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd); … … 510 511 * (i.e. height for a horizontal pager, or width for a vertical one) */ 511 512 513 /* except if the current dimension is 0 and app is setting for 514 * first time, then save amount as dimension. - GA 8/01 */ 515 512 516 if (PAGER_IsHorizontal(hwnd)) 513 winpos->cy = infoPtr->nHeight; 517 if (!infoPtr->nHeight && winpos->cy) 518 infoPtr->nHeight = winpos->cy; 519 else 520 winpos->cy = infoPtr->nHeight; 514 521 else 515 winpos->cx = infoPtr->nWidth; 516 } 517 518 return 0; 519 } 520 521 static void 522 if (!infoPtr->nWidth && winpos->cx) 523 infoPtr->nWidth = winpos->cx; 524 else 525 winpos->cx = infoPtr->nWidth; 526 return 0; 527 } 528 529 DefWindowProcA (hwnd, WM_WINDOWPOSCHANGING, wParam, (LPARAM)winpos); 530 531 return 1; 532 } 533 534 static INT 522 535 PAGER_SetFixedWidth(HWND hwnd, PAGER_INFO* infoPtr) 523 536 { … … 544 557 h = wndRect.bottom - wndRect.top + infoPtr->nButtonSize; 545 558 546 /* adjust non-scrollable dimension to fit the child */547 SetWindowPos(hwnd, 0, 0,0, infoPtr->nWidth, h,548 SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOZORDER);549 550 551 559 TRACE("[%04x] infoPtr->nWidth set to %d\n", 552 hwnd, infoPtr->nWidth); 553 } 554 555 static void 560 hwnd, infoPtr->nWidth); 561 562 return h; 563 } 564 565 static INT 556 566 PAGER_SetFixedHeight(HWND hwnd, PAGER_INFO* infoPtr) 557 567 { … … 578 588 w = wndRect.right - wndRect.left + infoPtr->nButtonSize; 579 589 580 /* adjust non-scrollable dimension to fit the child */581 SetWindowPos(hwnd, 0, 0,0, w, infoPtr->nHeight,582 SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOZORDER);583 584 590 TRACE("[%04x] infoPtr->nHeight set to %d\n", 585 hwnd, infoPtr->nHeight); 591 hwnd, infoPtr->nHeight); 592 593 return w; 586 594 } 587 595 … … 602 610 PAGER_SetPos(hwnd, 0, FALSE); 603 611 } 604 else 612 else 605 613 { 606 614 PAGER_UpdateBtns(hwnd, infoPtr, scrollRange, TRUE); … … 663 671 { 664 672 PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd); 673 INT hw; 665 674 666 675 infoPtr->hwndChild = IsWindow ((HWND)lParam) ? (HWND)lParam : 0; … … 670 679 TRACE("[%04x] hwndChild=%04x\n", hwnd, infoPtr->hwndChild); 671 680 672 if (PAGER_IsHorizontal(hwnd)) 673 PAGER_SetFixedHeight(hwnd, infoPtr); 674 else 675 PAGER_SetFixedWidth(hwnd, infoPtr); 681 if (PAGER_IsHorizontal(hwnd)) { 682 hw = PAGER_SetFixedHeight(hwnd, infoPtr); 683 /* adjust non-scrollable dimension to fit the child */ 684 SetWindowPos(hwnd, 0, 0,0, hw, infoPtr->nHeight, 685 SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOZORDER | 686 SWP_NOSIZE | SWP_NOACTIVATE); 687 } 688 else { 689 hw = PAGER_SetFixedWidth(hwnd, infoPtr); 690 /* adjust non-scrollable dimension to fit the child */ 691 SetWindowPos(hwnd, 0, 0,0, infoPtr->nWidth, hw, 692 SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOZORDER | 693 SWP_NOSIZE | SWP_NOACTIVATE); 694 } 676 695 677 696 /* position child within the page scroller */ 678 697 SetWindowPos(infoPtr->hwndChild, HWND_TOP, 679 698 0,0,0,0, 680 SWP_SHOWWINDOW | SWP_NOSIZE); 699 SWP_SHOWWINDOW | SWP_NOSIZE); /* native is 0 */ 681 700 682 701 infoPtr->nPos = -1; … … 701 720 nmpgScroll.hdr.code = PGN_SCROLL; 702 721 703 GetWindowRect(hwnd, &rcWnd); 704 GetClientRect(hwnd, &nmpgScroll.rcParent); 722 GetWindowRect(hwnd, &rcWnd); 723 GetClientRect(hwnd, &nmpgScroll.rcParent); 705 724 nmpgScroll.iXpos = nmpgScroll.iYpos = 0; 706 725 nmpgScroll.iDir = dir; … … 717 736 } 718 737 nmpgScroll.iScroll -= 2*infoPtr->nButtonSize; 719 738 720 739 SendMessageA (hwnd, WM_NOTIFY, 721 740 (WPARAM)nmpgScroll.hdr.idFrom, (LPARAM)&nmpgScroll); 722 741 723 742 TRACE("[%04x] PGN_SCROLL returns iScroll=%d\n", hwnd, nmpgScroll.iScroll); 724 743 … … 770 789 FIXME("[%04x] Drag and Drop style is not implemented yet.\n", hwnd); 771 790 /* 772 773 774 775 791 * If neither horizontal nor vertical style specified, default to vertical. 792 * This is probably not necessary, since the style may be set later on as 793 * the control is initialized, but just in case it isn't, set it here. 794 */ 776 795 if (!(dwStyle & PGS_HORZ) && !(dwStyle & PGS_VERT)) 777 796 { … … 799 818 PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd); 800 819 LPRECT lpRect = (LPRECT)lParam; 820 RECT rcChildw, rcmyw, wnrc, lbrc, rbrc; 821 POINT cursor; 822 801 823 /* 802 824 * lParam points to a RECT struct. On entry, the struct 803 * contains the proposed wnd rectangle for the window. 825 * contains the proposed wnd rectangle for the window. 804 826 * On exit, the struct should contain the screen 805 827 * coordinates of the corresponding window's client area. 806 828 */ 829 830 DefWindowProcA (hwnd, WM_NCCALCSIZE, wParam, lParam); 807 831 808 832 if (PAGER_IsHorizontal(hwnd)) 809 833 { 810 if (infoPtr->TLbtnState) /* != PGF_INVISIBLE */ 811 lpRect->left += infoPtr->nButtonSize; 812 if (infoPtr->BRbtnState) 813 lpRect->right -= infoPtr->nButtonSize; 834 infoPtr->nWidth = lpRect->right - lpRect->left; 835 PAGER_CalcSize (hwnd, &infoPtr->nWidth, TRUE); 836 GetWindowRect (infoPtr->hwndChild, &rcChildw); 837 MapWindowPoints (0, hwnd, (LPPOINT)&rcChildw, 2); 838 GetCursorPos (&cursor); 839 GetWindowRect (hwnd, &rcmyw); 840 if (PtInRect (&rcmyw, cursor)) { 841 GetWindowRect (hwnd, &wnrc); 842 lbrc = wnrc; 843 lbrc.right = lbrc.left + infoPtr->nButtonSize; 844 rbrc = wnrc; 845 rbrc.left = rbrc.right - infoPtr->nButtonSize; 846 TRACE("horz lb rect=(%d,%d)-(%d,%d), rb rect=(%d,%d)-(%d,%d)\n", 847 lbrc.left, lbrc.top, lbrc.right, lbrc.bottom, 848 rbrc.left, rbrc.top, rbrc.right, rbrc.bottom); 849 if (PtInRect (&lbrc, cursor) && infoPtr->TLbtnState) 850 RedrawWindow (hwnd, 0, 0, RDW_INVALIDATE | RDW_ERASE); 851 if (PtInRect (&rbrc, cursor) && infoPtr->BRbtnState) 852 RedrawWindow (hwnd, 0, 0, RDW_INVALIDATE | RDW_ERASE); 853 } 854 if (infoPtr->TLbtnState) /* != PGF_INVISIBLE */ 855 lpRect->left += infoPtr->nButtonSize; 856 if (infoPtr->BRbtnState) 857 lpRect->right -= infoPtr->nButtonSize; 814 858 } 815 859 else 816 860 { 817 if (infoPtr->TLbtnState) 818 lpRect->top += infoPtr->nButtonSize; 819 if (infoPtr->BRbtnState) 820 lpRect->bottom -= infoPtr->nButtonSize; 861 /* native does: (from trace of IE4 opening "Favorites" frame) 862 * DefWindowProc 863 * WM_NOITFY PGN_CALCSIZE w/ dwFlag=2 864 * GetWindowRect (child, &rc) 865 * MapWindowPoints (0, syspager, &rc, 2) 866 * GetCursorPos( &cur ) 867 * GetWindowRect (syspager, &rc2) 868 * PtInRect (&rc2, cur.x, cur.y) rtns 0 869 * returns with rect empty 870 */ 871 infoPtr->nHeight = lpRect->bottom - lpRect->top; 872 PAGER_CalcSize (hwnd, &infoPtr->nHeight, FALSE); 873 GetWindowRect (infoPtr->hwndChild, &rcChildw); 874 MapWindowPoints (0, hwnd, (LPPOINT)&rcChildw, 2); 875 GetCursorPos (&cursor); 876 GetWindowRect (hwnd, &rcmyw); 877 if (PtInRect (&rcmyw, cursor)) { 878 879 /* native does: 880 * GetWindowRect(pager, &rc) 881 * PtInRect(btn-left????, cur.x, cur.y) 882 * if true -> ??? 883 * PtInRect(btn-right????, cur.x, cur.y) 884 * if true 885 * RedrawWindow(pager, 0, 0, 5) 886 * return TRUE 887 */ 888 889 GetWindowRect (hwnd, &wnrc); 890 lbrc = wnrc; 891 lbrc.right = lbrc.left + infoPtr->nButtonSize; 892 rbrc = wnrc; 893 rbrc.left = rbrc.right - infoPtr->nButtonSize; 894 TRACE("vert lb rect=(%d,%d)-(%d,%d), rb rect=(%d,%d)-(%d,%d)\n", 895 lbrc.left, lbrc.top, lbrc.right, lbrc.bottom, 896 rbrc.left, rbrc.top, rbrc.right, rbrc.bottom); 897 if (PtInRect (&lbrc, cursor) && infoPtr->TLbtnState) 898 RedrawWindow (hwnd, 0, 0, RDW_INVALIDATE | RDW_ERASE); 899 if (PtInRect (&rbrc, cursor) && infoPtr->BRbtnState) 900 RedrawWindow (hwnd, 0, 0, RDW_INVALIDATE | RDW_ERASE); 901 } 902 if (infoPtr->TLbtnState) 903 lpRect->top += infoPtr->nButtonSize; 904 if (infoPtr->BRbtnState) 905 lpRect->bottom -= infoPtr->nButtonSize; 906 /* ???? */ 907 if ((lpRect->bottom < 0) || (lpRect->bottom > infoPtr->nHeight)) 908 lpRect->bottom = infoPtr->nHeight; 821 909 } 822 910 … … 864 952 bHorizontal, TRUE, infoPtr->TLbtnState); 865 953 PAGER_DrawButton(hdc, infoPtr->clrBk, rcBottomRight, 866 bHorizontal, FALSE, infoPtr->BRbtnState); 954 bHorizontal, FALSE, infoPtr->BRbtnState); 867 955 868 956 ReleaseDC( hwnd, hdc ); … … 870 958 } 871 959 872 static INT 960 static INT 873 961 PAGER_HitTest (HWND hwnd, LPPOINT pt) 874 962 { … … 977 1065 if(!(trackinfo.dwFlags & TME_LEAVE)) { 978 1066 trackinfo.dwFlags = TME_LEAVE; /* notify upon leaving */ 979 1067 980 1068 /* call TRACKMOUSEEVENT so we receive a WM_MOUSELEAVE message */ 981 1069 /* and can properly deactivate the hot button */ … … 983 1071 } 984 1072 985 SendMessageA(hwnd, WM_NCPAINT, 0, 0); 1073 SendMessageA(hwnd, WM_NCPAINT, 0, 0); 986 1074 } 987 1075 … … 1026 1114 1027 1115 TRACE("[%04x]\n", hwnd); 1028 1116 1029 1117 hit = PAGER_HitTest(hwnd, &pt); 1030 1118 … … 1034 1122 repaintBtns = infoPtr->TLbtnState != PGF_DEPRESSED; 1035 1123 infoPtr->TLbtnState = PGF_DEPRESSED; 1036 SetTimer(hwnd, TIMERID1, INITIAL_DELAY, 0); 1124 SetTimer(hwnd, TIMERID1, INITIAL_DELAY, 0); 1037 1125 } 1038 1126 else if (hit == HTRIGHT || hit == HTBOTTOM) … … 1040 1128 repaintBtns = infoPtr->BRbtnState != PGF_DEPRESSED; 1041 1129 infoPtr->BRbtnState = PGF_DEPRESSED; 1042 SetTimer(hwnd, TIMERID1, INITIAL_DELAY, 0); 1130 SetTimer(hwnd, TIMERID1, INITIAL_DELAY, 0); 1043 1131 } 1044 1132 1045 1133 if (repaintBtns) 1046 SendMessageA(hwnd, WM_NCPAINT, 0, 0); 1134 SendMessageA(hwnd, WM_NCPAINT, 0, 0); 1047 1135 1048 1136 switch(hit) … … 1089 1177 PAGER_EraseBackground (HWND hwnd, WPARAM wParam, LPARAM lParam) 1090 1178 { 1179 POINT pt, ptorig; 1180 HDC hdc = (HDC)wParam; 1181 HWND parent; 1182 1183 /* native does: 1184 * parent = GetParent(pager) 1185 * pt.x=0; pt.y=0; ????? 1186 * MapWindowPoints(pager, parent, &pt, 1) 1187 * OffsetWindowOrgEx(hdc, pt.x, pt.y, &ptorg) 1188 * SendMessageA(parent, WM_ERASEBKGND, hdc, 0) 1189 * SetWindowOrgEx(hdc, 0, 0, 0) 1190 */ 1191 1192 pt.x = 0; 1193 pt.y = 0; 1194 parent = GetParent(hwnd); 1195 MapWindowPoints(hwnd, parent, &pt, 1); 1196 OffsetWindowOrgEx (hdc, pt.x, pt.y, &ptorig); 1197 SendMessageA (parent, WM_ERASEBKGND, wParam, lParam); 1198 SetWindowOrgEx (hdc, ptorig.x, ptorig.y, 0); 1199 1200 1201 #if 0 1091 1202 PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd); 1092 1203 HBRUSH hBrush = CreateSolidBrush(infoPtr->clrBk); … … 1104 1215 1105 1216 DeleteObject (hBrush); 1217 #endif 1218 1106 1219 return TRUE; 1107 1220 } … … 1131 1244 1132 1245 if (!infoPtr && (uMsg != WM_CREATE)) 1133 1246 return DefWindowProcA (hwnd, uMsg, wParam, lParam); 1134 1247 1135 1248 switch (uMsg) … … 1157 1270 case PGM_RECALCSIZE: 1158 1271 return PAGER_RecalcSize(hwnd); 1159 1272 1160 1273 case PGM_SETBKCOLOR: 1161 1274 return PAGER_SetBkColor (hwnd, wParam, lParam); … … 1186 1299 1187 1300 case WM_WINDOWPOSCHANGING: 1188 return PAGER_HandleWindowPosChanging (hwnd, (WINDOWPOS*)lParam);1301 return PAGER_HandleWindowPosChanging (hwnd, wParam, (WINDOWPOS*)lParam); 1189 1302 1190 1303 case WM_NCCALCSIZE: … … 1205 1318 if (infoPtr->bForward && infoPtr->hwndChild) 1206 1319 PostMessageA(infoPtr->hwndChild, WM_MOUSEMOVE, wParam, lParam); 1207 return TRUE; 1320 return TRUE; 1208 1321 1209 1322 case WM_MOUSELEAVE: 1210 return PAGER_MouseLeave (hwnd, wParam, lParam); 1323 return PAGER_MouseLeave (hwnd, wParam, lParam); 1211 1324 1212 1325 case WM_LBUTTONDOWN: … … 1220 1333 /* 1221 1334 case WM_PAINT: 1222 return PAGER_Paint (hwnd, wParam); 1335 return PAGER_Paint (hwnd, wParam); 1223 1336 */ 1224 1337 case WM_TIMER: … … 1234 1347 { 1235 1348 PAGER_Scroll(hwnd, infoPtr->direction); 1236 SetTimer(hwnd, TIMERID2, REPEAT_DELAY, 0); 1349 SetTimer(hwnd, TIMERID2, REPEAT_DELAY, 0); 1237 1350 } 1238 1351 break; … … 1267 1380 wndClass.hbrBackground = 0; 1268 1381 wndClass.lpszClassName = WC_PAGESCROLLERA; 1269 1382 1270 1383 RegisterClassA (&wndClass); 1271 1384 }
Note:
See TracChangeset
for help on using the changeset viewer.