Mercurial > dwindows
comparison win/dw.c @ 508:078a40ba2e41
Added dw_container_get_column_type and dw_filesystem_get_column_type.
author | mhessling@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Wed, 18 Feb 2004 10:26:49 +0000 |
parents | c607eb385e58 |
children | a9cfbc5ad01e |
comparison
equal
deleted
inserted
replaced
507:c607eb385e58 | 508:078a40ba2e41 |
---|---|
6727 { | 6727 { |
6728 dw_filesystem_set_file(handle, NULL, row, filename, icon); | 6728 dw_filesystem_set_file(handle, NULL, row, filename, icon); |
6729 } | 6729 } |
6730 | 6730 |
6731 /* | 6731 /* |
6732 * Gets column type for a container column | |
6733 * Parameters: | |
6734 * handle: Handle to the container window (widget). | |
6735 * column: Zero based column. | |
6736 */ | |
6737 int API dw_container_get_column_type(HWND handle, int column) | |
6738 { | |
6739 ContainerInfo *cinfo = (ContainerInfo *)GetWindowLongPtr(handle, GWLP_USERDATA); | |
6740 ULONG *flags; | |
6741 int rc; | |
6742 | |
6743 if(!cinfo || !cinfo->flags) | |
6744 return 0; | |
6745 | |
6746 flags = cinfo->flags; | |
6747 | |
6748 if(flags[column] & DW_CFA_BITMAPORICON) | |
6749 rc = DW_CFA_BITMAPORICON; | |
6750 else if(flags[column] & DW_CFA_STRING) | |
6751 rc = DW_CFA_STRING; | |
6752 else if(flags[column] & DW_CFA_ULONG) | |
6753 rc = DW_CFA_ULONG; | |
6754 else if(flags[column] & DW_CFA_DATE) | |
6755 rc = DW_CFA_DATE; | |
6756 else if(flags[column] & DW_CFA_TIME) | |
6757 rc = DW_CFA_TIME; | |
6758 else | |
6759 rc = 0; | |
6760 return rc; | |
6761 } | |
6762 | |
6763 /* | |
6764 * Gets column type for a filesystem container column | |
6765 * Parameters: | |
6766 * handle: Handle to the container window (widget). | |
6767 * column: Zero based column. | |
6768 */ | |
6769 int API dw_filesystem_get_column_type(HWND handle, int column) | |
6770 { | |
6771 return dw_container_get_column_type( handle, column + 1 ); | |
6772 } | |
6773 | |
6774 /* | |
6732 * Sets the width of a column in the container. | 6775 * Sets the width of a column in the container. |
6733 * Parameters: | 6776 * Parameters: |
6734 * handle: Handle to window (widget) of container. | 6777 * handle: Handle to window (widget) of container. |
6735 * column: Zero based column of width being set. | 6778 * column: Zero based column of width being set. |
6736 * width: Width of column in pixels. | 6779 * width: Width of column in pixels. |