Mercurial > dwindows
comparison win/dw.c @ 843:d51e958aad95
Updates to the comments about scrollboxes and removing them from incomplete status.
Will be functional on 4 of the 5 platforms today... and will be implementing on OS/2 as soon as I decide the best way.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Tue, 29 Mar 2011 23:04:32 +0000 |
parents | 89dd3e442e7e |
children | 9750236bcdd5 |
comparison
equal
deleted
inserted
replaced
842:89dd3e442e7e | 843:d51e958aad95 |
---|---|
4576 SetParent(tmpbox, hwndframe); | 4576 SetParent(tmpbox, hwndframe); |
4577 SetWindowLongPtr(hwndframe, GWLP_USERDATA, (LONG_PTR)cinfo); | 4577 SetWindowLongPtr(hwndframe, GWLP_USERDATA, (LONG_PTR)cinfo); |
4578 return hwndframe; | 4578 return hwndframe; |
4579 } | 4579 } |
4580 | 4580 |
4581 /* | |
4582 * Returns the position of the scrollbar in the scrollbox | |
4583 * Parameters: | |
4584 * handle: Handle to the scrollbox to be queried. | |
4585 * orient: The vertical or horizontal scrollbar. | |
4586 */ | |
4581 int API dw_scrollbox_get_pos( HWND handle, int orient ) | 4587 int API dw_scrollbox_get_pos( HWND handle, int orient ) |
4582 { | 4588 { |
4583 SCROLLINFO si; | 4589 SCROLLINFO si; |
4584 int bar = SB_HORZ; | 4590 int bar = SB_HORZ; |
4585 | 4591 |
4589 } | 4595 } |
4590 | 4596 |
4591 si.cbSize = sizeof(SCROLLINFO); | 4597 si.cbSize = sizeof(SCROLLINFO); |
4592 si.fMask = SIF_POS; | 4598 si.fMask = SIF_POS; |
4593 | 4599 |
4594 /* Save the current scroll positions */ | 4600 /* Get the current scroll positions */ |
4595 if(!GetScrollInfo(handle, bar, &si)) | 4601 if(!GetScrollInfo(handle, bar, &si)) |
4596 { | 4602 { |
4597 return -1; | 4603 return -1; |
4598 } | 4604 } |
4599 return si.nPos; | 4605 return si.nPos; |
4600 } | 4606 } |
4601 | 4607 |
4608 /* | |
4609 * Gets the range for the scrollbar in the scrollbox. | |
4610 * Parameters: | |
4611 * handle: Handle to the scrollbox to be queried. | |
4612 * orient: The vertical or horizontal scrollbar. | |
4613 */ | |
4602 int API dw_scrollbox_get_range( HWND handle, int orient ) | 4614 int API dw_scrollbox_get_range( HWND handle, int orient ) |
4603 { | 4615 { |
4604 SCROLLINFO si; | 4616 SCROLLINFO si; |
4605 int bar = SB_HORZ; | 4617 int bar = SB_HORZ; |
4606 | 4618 |
4610 } | 4622 } |
4611 | 4623 |
4612 si.cbSize = sizeof(SCROLLINFO); | 4624 si.cbSize = sizeof(SCROLLINFO); |
4613 si.fMask = SIF_RANGE; | 4625 si.fMask = SIF_RANGE; |
4614 | 4626 |
4615 /* Save the current scroll positions */ | 4627 /* Get the current scroll positions */ |
4616 if(!GetScrollInfo(handle, bar, &si)) | 4628 if(!GetScrollInfo(handle, bar, &si)) |
4617 { | 4629 { |
4618 return -1; | 4630 return -1; |
4619 } | 4631 } |
4620 return si.nMax; | 4632 return si.nMax; |