| 979 | } |
| 980 | |
| 981 | LRESULT CSaveModifiedItemsDialog::OnHeaderItemChanging(int /*idCtrl*/, LPNMHDR pnmh, BOOL& bHandled) |
| 982 | { |
| 983 | if((m_header.GetStyle() & HDS_FULLDRAG) == HDS_FULLDRAG) |
| 984 | { |
| 985 | // HDS_FULLDRAG is set, so the contents are updated as they |
| 986 | // drag the column header divider. |
| 987 | NMHEADER* headerInfo = (NMHEADER*)pnmh; |
| 988 | if( headerInfo && |
| 989 | headerInfo->pitem && |
| 990 | (headerInfo->pitem->mask & HDI_WIDTH) == HDI_WIDTH) |
| 991 | { |
| 992 | if(m_trackColumnIndex == headerInfo->iItem) |
| 993 | { |
| 994 | int columnRight = headerInfo->iItem + 1; |
| 995 | // Find the first column to the right that isn't being hidden. |
| 996 | while((columnRight < m_lastVisibleColumn) && !m_showColumn[columnRight]) |
| 997 | { |
| 998 | ++columnRight; |
| 999 | } |
| 1000 | |
| 1001 | if(columnRight <= m_lastVisibleColumn) |
| 1002 | { |
| 1003 | int widthLeft = headerInfo->pitem->cxy; |
| 1004 | int widthRight = m_list.GetColumnWidth(columnRight); |
| 1005 | int newWidth = widthRight - (widthLeft - m_trackColumnWidth); |
| 1006 | if((widthLeft > eMinimumColumnWidth) && (newWidth > eMinimumColumnWidth)) |
| 1007 | { |
| 1008 | // TODO: When making the right column bigger before the |
| 1009 | // left column has gotten smaller, the scroll bars flash |
| 1010 | // visible. Do something to prevent that. |
| 1011 | m_list.SetColumnWidth(columnRight, newWidth); |
| 1012 | |
| 1013 | m_trackColumnWidth = widthLeft; |
| 1014 | } |
| 1015 | else |
| 1016 | { |
| 1017 | // Don't allow the change |
| 1018 | bHandled = TRUE; |
| 1019 | return TRUE; |
| 1020 | } |
| 1021 | } |
| 1022 | } |
| 1023 | } |
| 1024 | } |
| 1025 | bHandled = FALSE; |
| 1026 | return 0; |
| 1027 | } |
| 1028 | |
| 1029 | LRESULT CSaveModifiedItemsDialog::OnHeaderDividerDoubleClick(int /*idCtrl*/, LPNMHDR /*pnmh*/, BOOL& bHandled) |
| 1030 | { |
nothing calls this directly
no outgoing calls
no test coverage detected