Mercurial > dwindows
comparison win/dw.c @ 842:89dd3e442e7e
Implemented dw_scrollbox_get_pos() and dw_scrollbox_get_range() on Windows.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Tue, 29 Mar 2011 22:57:49 +0000 |
parents | 9be19dbd2ff4 |
children | d51e958aad95 |
comparison
equal
deleted
inserted
replaced
841:9be19dbd2ff4 | 842:89dd3e442e7e |
---|---|
4578 return hwndframe; | 4578 return hwndframe; |
4579 } | 4579 } |
4580 | 4580 |
4581 int API dw_scrollbox_get_pos( HWND handle, int orient ) | 4581 int API dw_scrollbox_get_pos( HWND handle, int orient ) |
4582 { | 4582 { |
4583 return 0; | 4583 SCROLLINFO si; |
4584 int bar = SB_HORZ; | |
4585 | |
4586 if(orient == DW_VERT) | |
4587 { | |
4588 bar = SB_VERT; | |
4589 } | |
4590 | |
4591 si.cbSize = sizeof(SCROLLINFO); | |
4592 si.fMask = SIF_POS; | |
4593 | |
4594 /* Save the current scroll positions */ | |
4595 if(!GetScrollInfo(handle, bar, &si)) | |
4596 { | |
4597 return -1; | |
4598 } | |
4599 return si.nPos; | |
4584 } | 4600 } |
4585 | 4601 |
4586 int API dw_scrollbox_get_range( HWND handle, int orient ) | 4602 int API dw_scrollbox_get_range( HWND handle, int orient ) |
4587 { | 4603 { |
4588 return 0; | 4604 SCROLLINFO si; |
4605 int bar = SB_HORZ; | |
4606 | |
4607 if(orient == DW_VERT) | |
4608 { | |
4609 bar = SB_VERT; | |
4610 } | |
4611 | |
4612 si.cbSize = sizeof(SCROLLINFO); | |
4613 si.fMask = SIF_RANGE; | |
4614 | |
4615 /* Save the current scroll positions */ | |
4616 if(!GetScrollInfo(handle, bar, &si)) | |
4617 { | |
4618 return -1; | |
4619 } | |
4620 return si.nMax; | |
4589 } | 4621 } |
4590 /* | 4622 /* |
4591 * Create a new Group Box to be packed. | 4623 * Create a new Group Box to be packed. |
4592 * Parameters: | 4624 * Parameters: |
4593 * type: Either DW_VERT (vertical) or DW_HORZ (horizontal). | 4625 * type: Either DW_VERT (vertical) or DW_HORZ (horizontal). |