Mercurial > dwindows
comparison win/dw.c @ 33:72675de7d229
Renamed slider class to percent class. Implemented my own percent widget
on OS/2 to avoid horrible memory leak.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 30 Aug 2001 06:07:19 +0000 |
parents | f3bf96c2786d |
children | b03b24bb95f8 |
comparison
equal
deleted
inserted
replaced
32:f3bf96c2786d | 33:72675de7d229 |
---|---|
3361 return tmp; | 3361 return tmp; |
3362 } | 3362 } |
3363 | 3363 |
3364 | 3364 |
3365 /* | 3365 /* |
3366 * Create a new slider window (widget) to be packed. | 3366 * Create a new percent bar window (widget) to be packed. |
3367 * Parameters: | 3367 * Parameters: |
3368 * id: An ID to be used with WinWindowFromID() or 0L. | 3368 * id: An ID to be used with WinWindowFromID() or 0L. |
3369 */ | 3369 */ |
3370 HWND dw_slider_new(ULONG id) | 3370 HWND dw_percent_new(ULONG id) |
3371 { | 3371 { |
3372 return CreateWindow(PROGRESS_CLASS, | 3372 return CreateWindow(PROGRESS_CLASS, |
3373 "", | 3373 "", |
3374 WS_CHILD | WS_CLIPCHILDREN, | 3374 WS_CHILD | WS_CLIPCHILDREN, |
3375 0,0,2000,1000, | 3375 0,0,2000,1000, |
4373 void dw_mle_thaw(HWND handle) | 4373 void dw_mle_thaw(HWND handle) |
4374 { | 4374 { |
4375 } | 4375 } |
4376 | 4376 |
4377 /* | 4377 /* |
4378 * Returns the range of the slider. | 4378 * Returns the range of the percent bar. |
4379 * Parameters: | 4379 * Parameters: |
4380 * handle: Handle to the slider to be queried. | 4380 * handle: Handle to the slider to be queried. |
4381 */ | 4381 */ |
4382 unsigned int dw_slider_query_range(HWND handle) | 4382 unsigned int dw_percent_query_range(HWND handle) |
4383 { | 4383 { |
4384 return (unsigned int)SendMessage(handle, PBM_GETRANGE, (WPARAM)FALSE, 0); | 4384 return (unsigned int)SendMessage(handle, PBM_GETRANGE, (WPARAM)FALSE, 0); |
4385 } | 4385 } |
4386 | 4386 |
4387 /* | 4387 /* |
4388 * Sets the slider position. | 4388 * Sets the percent bar position. |
4389 * Parameters: | 4389 * Parameters: |
4390 * handle: Handle to the slider to be set. | 4390 * handle: Handle to the slider to be set. |
4391 * position: Position of the slider withing the range. | 4391 * position: Position of the slider withing the range. |
4392 */ | 4392 */ |
4393 void dw_slider_set_pos(HWND handle, unsigned int position) | 4393 void dw_percent_set_pos(HWND handle, unsigned int position) |
4394 { | 4394 { |
4395 SendMessage(handle, PBM_SETPOS, (WPARAM)position, 0); | 4395 SendMessage(handle, PBM_SETPOS, (WPARAM)position, 0); |
4396 } | 4396 } |
4397 | 4397 |
4398 /* | 4398 /* |