Changeset 1091 for trunk/src/user32/oslibwin.cpp
- Timestamp:
- Sep 29, 1999, 10:27:16 AM (26 years ago)
- File:
-
- 1 edited
-
trunk/src/user32/oslibwin.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/oslibwin.cpp
r1057 r1091 1 /* $Id: oslibwin.cpp,v 1. 9 1999-09-26 10:09:59sandervl Exp $ */1 /* $Id: oslibwin.cpp,v 1.10 1999-09-29 08:27:15 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 709 709 } 710 710 return TRUE; 711 } 712 //****************************************************************************** 713 //****************************************************************************** 714 ULONG OSLibWinGetScrollPos(HWND hwndParent, int scrollBar) 715 { 716 HWND hwndScroll; 717 718 if(scrollBar == OSLIB_VSCROLL) { 719 hwndScroll = WinWindowFromID(hwndParent, FID_VERTSCROLL); 720 } 721 else hwndScroll = WinWindowFromID(hwndParent, FID_HORZSCROLL); 722 723 if(hwndScroll == NULL) 724 return 0; 725 726 return (ULONG)WinSendMsg(hwndScroll, SBM_QUERYPOS, 0, 0); 727 } 728 //****************************************************************************** 729 //****************************************************************************** 730 ULONG OSLibWinSetScrollPos(HWND hwndParent, int scrollBar, int pos, int fRedraw) 731 { 732 HWND hwndScroll; 733 ULONG oldPos; 734 735 if(scrollBar == OSLIB_VSCROLL) { 736 hwndScroll = WinWindowFromID(hwndParent, FID_VERTSCROLL); 737 } 738 else hwndScroll = WinWindowFromID(hwndParent, FID_HORZSCROLL); 739 740 if(hwndScroll == NULL) 741 return 0; 742 743 oldPos = (ULONG)WinSendMsg(hwndScroll, SBM_QUERYPOS, 0, 0); 744 745 if(WinSendMsg(hwndScroll, SBM_SETPOS, MPFROMSHORT(pos), MPFROMLONG(fRedraw)) == FALSE) 746 return 0; 747 748 return oldPos; 749 } 750 //****************************************************************************** 751 //****************************************************************************** 752 BOOL OSLibWinSetScrollRange(HWND hwndParent, int scrollBar, int minpos, 753 int maxpos, int fRedraw) 754 { 755 HWND hwndScroll; 756 757 if(scrollBar == OSLIB_VSCROLL) { 758 hwndScroll = WinWindowFromID(hwndParent, FID_VERTSCROLL); 759 } 760 else hwndScroll = WinWindowFromID(hwndParent, FID_HORZSCROLL); 761 762 if(hwndScroll == NULL) 763 return 0; 764 765 return (BOOL)WinSendMsg( hwndScroll, SBM_SETSCROLLBAR, 766 MPFROMLONG(WinSendMsg(hwndScroll, SBM_QUERYPOS, 0, 0)), 767 MPFROM2SHORT( minpos ,maxpos ) ); 768 } 769 //****************************************************************************** 770 //****************************************************************************** 771 BOOL OSLibWinSetScrollPageSize(HWND hwndParent, int scrollBar, int pagesize, 772 int totalsize, int fRedraw) 773 { 774 HWND hwndScroll; 775 776 if(scrollBar == OSLIB_VSCROLL) { 777 hwndScroll = WinWindowFromID(hwndParent, FID_VERTSCROLL); 778 } 779 else hwndScroll = WinWindowFromID(hwndParent, FID_HORZSCROLL); 780 781 if(hwndScroll == NULL) 782 return 0; 783 784 return (BOOL)WinSendMsg( hwndScroll, SBM_SETTHUMBSIZE, 785 MPFROM2SHORT(pagesize, totalsize), 786 0); 787 } 788 //****************************************************************************** 789 //****************************************************************************** 790 void OSLibWinChangeScrollStyle(HWND hwndParent, int scrollBar, int Reserved) 791 { 792 HWND hwndScroll; 793 794 if(scrollBar == OSLIB_VSCROLL) { 795 hwndScroll = WinWindowFromID(hwndParent, FID_VERTSCROLL); 796 } 797 else hwndScroll = WinWindowFromID(hwndParent, FID_HORZSCROLL); 798 799 if(hwndScroll == NULL) 800 return; 801 802 WinSetWindowULong(hwndScroll, QWL_STYLE, 803 WinQueryWindowULong(hwndScroll, QWL_STYLE) | 804 SBS_AUTOTRACK | SBS_AUTOSIZE); 711 805 } 712 806 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.
