comparison win/dw.c @ 79:8082cb0e7c2e

Updated to the latest DW.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Wed, 27 Mar 2002 09:10:49 +0000
parents c629838d9805
children aec9a0b0b539
comparison
equal deleted inserted replaced
78:06fe66722371 79:8082cb0e7c2e
1908 break; 1908 break;
1909 case WM_USER+10: 1909 case WM_USER+10:
1910 { 1910 {
1911 if(cinfo->buddy) 1911 if(cinfo->buddy)
1912 { 1912 {
1913 long val, position; 1913 long val;
1914 char tmpbuf[100] = "";
1915
1916 GetWindowText(cinfo->buddy, tmpbuf, 99);
1917
1918 position = atol(tmpbuf);
1919 1914
1920 if(IS_IE5PLUS) 1915 if(IS_IE5PLUS)
1921 val = (long)SendMessage(cinfo->buddy, UDM_GETPOS32, 0, 0); 1916 val = (long)SendMessage(cinfo->buddy, UDM_GETPOS32, 0, 0);
1922 else 1917 else
1923 val = (long)SendMessage(cinfo->buddy, UDM_GETPOS, 0, 0); 1918 val = (long)SendMessage(cinfo->buddy, UDM_GETPOS, 0, 0);
1924 1919
1925 if(val != position) 1920 sprintf(tmpbuf, "%d", val);
1926 { 1921 SetWindowText(hWnd, tmpbuf);
1927 sprintf(tmpbuf, "%d", val);
1928 SetWindowText(hWnd, tmpbuf);
1929 }
1930 } 1922 }
1931 } 1923 }
1932 break; 1924 break;
1933 case WM_KEYUP: 1925 case WM_KEYUP:
1934 { 1926 {
4824 void dw_listbox_set_top(HWND handle, int top) 4816 void dw_listbox_set_top(HWND handle, int top)
4825 { 4817 {
4826 SendMessage(handle, LB_SETTOPINDEX, (WPARAM)top, 0); 4818 SendMessage(handle, LB_SETTOPINDEX, (WPARAM)top, 0);
4827 } 4819 }
4828 4820
4829 #define MLE_MAX 200000 4821 #define MLE_MAX 1000000
4830 /* 4822 /*
4831 * Adds text to an MLE box and returns the current point. 4823 * Adds text to an MLE box and returns the current point.
4832 * Parameters: 4824 * Parameters:
4833 * handle: Handle to the MLE to be queried. 4825 * handle: Handle to the MLE to be queried.
4834 * buffer: Text buffer to be imported. 4826 * buffer: Text buffer to be imported.
5511 lvi.iItem = 1000000; 5503 lvi.iItem = 1000000;
5512 lvi.pszText = ""; 5504 lvi.pszText = "";
5513 lvi.cchTextMax = 1; 5505 lvi.cchTextMax = 1;
5514 lvi.iImage = -1; 5506 lvi.iImage = -1;
5515 5507
5508 ShowWindow(handle, SW_HIDE);
5516 for(z=0;z<rowcount;z++) 5509 for(z=0;z<rowcount;z++)
5517 ListView_InsertItem(handle, &lvi); 5510 ListView_InsertItem(handle, &lvi);
5518 return (void *)handle; 5511 return (void *)handle;
5519 } 5512 }
5520 5513
5731 * pointer: Pointer to the allocated memory in dw_container_alloc(). 5724 * pointer: Pointer to the allocated memory in dw_container_alloc().
5732 * rowcount: The number of rows to be inserted. 5725 * rowcount: The number of rows to be inserted.
5733 */ 5726 */
5734 void dw_container_insert(HWND handle, void *pointer, int rowcount) 5727 void dw_container_insert(HWND handle, void *pointer, int rowcount)
5735 { 5728 {
5736 /* This isn't a separate step in windows. */ 5729 ShowWindow(handle, SW_SHOW);
5737 } 5730 }
5738 5731
5739 /* 5732 /*
5740 * Removes all rows from a container. 5733 * Removes all rows from a container.
5741 * Parameters: 5734 * Parameters: