4 * Copyright 1997, 2002 Dimitrie O. Paun
5 * Copyright 1998, 1999 Eric Kohl
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 * This code was audited for completeness against the documented features
24 * of Comctl32.dll version 6.0 on Sep. 9, 2002, by Dimitrie O. Paun.
26 * Unless otherwise noted, we believe this code to be complete, as per
27 * the specification mentioned above.
28 * If you discover missing features, or bugs, please note them below.
43 #include "wine/debug.h"
45 WINE_DEFAULT_DEBUG_CHANNEL(progress);
49 HWND Self; /* The window handle for this control */
50 INT CurVal; /* Current progress value */
51 INT MinVal; /* Minimum progress value */
52 INT MaxVal; /* Maximum progress value */
53 INT Step; /* Step to use on PMB_STEPIT */
54 INT MarqueePos; /* Marquee animation position */
55 BOOL Marquee; /* Whether the marquee animation is enabled */
56 COLORREF ColorBar; /* Bar color */
57 COLORREF ColorBk; /* Background color */
58 HFONT Font; /* Handle to font (not unused) */
61 /* Control configuration constants */
64 #define MARQUEE_LEDS 5
65 #define ID_MARQUEE_TIMER 1
67 /* Helper to obtain size of a progress bar chunk ("led"). */
68 static inline int get_led_size ( PROGRESS_INFO *infoPtr, LONG style,
71 HTHEME theme = GetWindowTheme (infoPtr->Self);
75 if (SUCCEEDED( GetThemeInt( theme, 0, 0, TMT_PROGRESSCHUNKSIZE, &chunkSize )))
79 if (style & PBS_VERTICAL)
80 return MulDiv (rect->right - rect->left, 2, 3);
82 return MulDiv (rect->bottom - rect->top, 2, 3);
85 /* Helper to obtain gap between progress bar chunks */
86 static inline int get_led_gap ( PROGRESS_INFO *infoPtr )
88 HTHEME theme = GetWindowTheme (infoPtr->Self);
92 if (SUCCEEDED( GetThemeInt( theme, 0, 0, TMT_PROGRESSSPACESIZE, &spaceSize )))
99 /* Get client rect. Takes into account that theming needs no adjustment. */
100 static inline void get_client_rect (HWND hwnd, RECT* rect)
102 GetClientRect (hwnd, rect);
103 if (!GetWindowTheme (hwnd))
104 InflateRect(rect, -1, -1);
107 /* Compute the extend of the bar */
108 static inline int get_bar_size( LONG style, const RECT* rect )
110 if (style & PBS_VERTICAL)
111 return rect->bottom - rect->top;
113 return rect->right - rect->left;
116 /* Compute the pixel position of a progress value */
117 static inline int get_bar_position( PROGRESS_INFO *infoPtr, LONG style,
118 const RECT* rect, INT value )
120 return MulDiv (value - infoPtr->MinVal, get_bar_size (style, rect),
121 infoPtr->MaxVal - infoPtr->MinVal);
124 /***********************************************************************
125 * PROGRESS_Invalidate
127 * Invalide the range between old and new pos.
129 static void PROGRESS_Invalidate( PROGRESS_INFO *infoPtr, INT old, INT new )
131 LONG style = GetWindowLongW (infoPtr->Self, GWL_STYLE);
134 BOOL barSmooth = (style & PBS_SMOOTH) && !GetWindowTheme (infoPtr->Self);
136 get_client_rect( infoPtr->Self, &rect );
138 oldPos = get_bar_position( infoPtr, style, &rect, old );
139 newPos = get_bar_position( infoPtr, style, &rect, new );
141 if (style & PBS_VERTICAL)
143 rect.top = rect.bottom - max( oldPos, newPos );
144 rect.bottom = rect.bottom - min( oldPos, newPos );
145 if (!barSmooth) rect.top -=
146 get_led_size (infoPtr, style, &rect);
150 rect.left = min( oldPos, newPos );
151 rect.right = max( oldPos, newPos );
152 if (!barSmooth) rect.right +=
153 get_led_size (infoPtr, style, &rect);
155 InvalidateRect( infoPtr->Self, &rect, oldPos > newPos );
158 /* Information for a progress bar drawing helper */
159 typedef struct tagProgressDrawInfo
170 typedef void (*ProgressDrawProc)(const ProgressDrawInfo* di, int start, int end);
172 /* draw solid horizontal bar from 'start' to 'end' */
173 static void draw_solid_bar_H (const ProgressDrawInfo* di, int start, int end)
176 r.left = di->rect.left + start;
177 r.top = di->rect.top;
178 r.right = di->rect.left + end;
179 r.bottom = di->rect.bottom;
180 FillRect (di->hdc, &r, di->hbrBar);
183 /* draw solid horizontal background from 'start' to 'end' */
184 static void draw_solid_bkg_H (const ProgressDrawInfo* di, int start, int end)
187 r.left = di->rect.left + start;
188 r.top = di->rect.top;
189 r.right = di->rect.left + end;
190 r.bottom = di->rect.bottom;
191 FillRect (di->hdc, &r, di->hbrBk);
194 /* draw solid vertical bar from 'start' to 'end' */
195 static void draw_solid_bar_V (const ProgressDrawInfo* di, int start, int end)
198 r.left = di->rect.left;
199 r.top = di->rect.bottom - end;
200 r.right = di->rect.right;
201 r.bottom = di->rect.bottom - start;
202 FillRect (di->hdc, &r, di->hbrBar);
205 /* draw solid vertical background from 'start' to 'end' */
206 static void draw_solid_bkg_V (const ProgressDrawInfo* di, int start, int end)
209 r.left = di->rect.left;
210 r.top = di->rect.bottom - end;
211 r.right = di->rect.right;
212 r.bottom = di->rect.bottom - start;
213 FillRect (di->hdc, &r, di->hbrBk);
216 /* draw chunky horizontal bar from 'start' to 'end' */
217 static void draw_chunk_bar_H (const ProgressDrawInfo* di, int start, int end)
220 int right = di->rect.left + end;
221 r.left = di->rect.left + start;
222 r.top = di->rect.top;
223 r.bottom = di->rect.bottom;
224 while (r.left < right)
226 r.right = min (r.left + di->ledW, right);
227 FillRect (di->hdc, &r, di->hbrBar);
229 r.right = min (r.left + di->ledGap, right);
230 FillRect (di->hdc, &r, di->hbrBk);
235 /* draw chunky vertical bar from 'start' to 'end' */
236 static void draw_chunk_bar_V (const ProgressDrawInfo* di, int start, int end)
239 int top = di->rect.bottom - end;
240 r.left = di->rect.left;
241 r.right = di->rect.right;
242 r.bottom = di->rect.bottom - start;
243 while (r.bottom > top)
245 r.top = max (r.bottom - di->ledW, top);
246 FillRect (di->hdc, &r, di->hbrBar);
248 r.top = max (r.bottom - di->ledGap, top);
249 FillRect (di->hdc, &r, di->hbrBk);
254 /* drawing functions for "classic" style */
255 static const ProgressDrawProc drawProcClassic[8] = {
258 draw_solid_bar_H, draw_solid_bkg_H,
260 draw_solid_bar_V, draw_solid_bkg_V,
263 draw_chunk_bar_H, draw_solid_bkg_H,
265 draw_chunk_bar_V, draw_solid_bkg_V,
268 /* draw themed horizontal bar from 'start' to 'end' */
269 static void draw_theme_bar_H (const ProgressDrawInfo* di, int start, int end)
272 int right = di->rect.left + end;
273 r.left = di->rect.left + start;
274 r.top = di->rect.top;
275 r.bottom = di->rect.bottom;
276 while (r.left < right)
278 r.right = min (r.left + di->ledW, right);
279 DrawThemeBackground (di->theme, di->hdc, PP_CHUNK, 0, &r, NULL);
281 r.right = min (r.left + di->ledGap, right);
282 DrawThemeBackground (di->theme, di->hdc, PP_BAR, 0, &di->bgRect, &r);
287 /* draw themed horizontal bar from 'start' to 'end' */
288 static void draw_theme_bar_V (const ProgressDrawInfo* di, int start, int end)
291 int top = di->rect.bottom - end;
292 r.left = di->rect.left;
293 r.right = di->rect.right;
294 r.bottom = di->rect.bottom - start;
295 while (r.bottom > top)
297 r.top = max (r.bottom - di->ledW, top);
298 DrawThemeBackground (di->theme, di->hdc, PP_CHUNKVERT, 0, &r, NULL);
300 r.top = max (r.bottom - di->ledGap, top);
301 DrawThemeBackground (di->theme, di->hdc, PP_BARVERT, 0, &di->bgRect, &r);
306 /* draw themed horizontal background from 'start' to 'end' */
307 static void draw_theme_bkg_H (const ProgressDrawInfo* di, int start, int end)
310 r.left = di->rect.left + start;
311 r.top = di->rect.top;
312 r.right = di->rect.left + end;
313 r.bottom = di->rect.bottom;
314 DrawThemeBackground (di->theme, di->hdc, PP_BAR, 0, &di->bgRect, &r);
317 /* draw themed vertical background from 'start' to 'end' */
318 static void draw_theme_bkg_V (const ProgressDrawInfo* di, int start, int end)
321 r.left = di->rect.left;
322 r.top = di->rect.bottom - end;
323 r.right = di->rect.right;
324 r.bottom = di->rect.bottom - start;
325 DrawThemeBackground (di->theme, di->hdc, PP_BARVERT, 0, &di->bgRect, &r);
328 /* drawing functions for themed style */
329 static const ProgressDrawProc drawProcThemed[8] = {
332 draw_theme_bar_H, draw_theme_bkg_H,
334 draw_theme_bar_V, draw_theme_bkg_V,
337 draw_theme_bar_H, draw_theme_bkg_H,
339 draw_theme_bar_V, draw_theme_bkg_V,
342 /***********************************************************************
344 * Draws the progress bar.
346 static LRESULT PROGRESS_Draw (PROGRESS_INFO *infoPtr, HDC hdc)
351 const ProgressDrawProc* drawProcs;
352 ProgressDrawInfo pdi;
354 TRACE("(infoPtr=%p, hdc=%p)\n", infoPtr, hdc);
357 pdi.theme = GetWindowTheme (infoPtr->Self);
359 /* get the required bar brush */
360 if (infoPtr->ColorBar == CLR_DEFAULT)
361 pdi.hbrBar = GetSysColorBrush(COLOR_HIGHLIGHT);
363 pdi.hbrBar = CreateSolidBrush (infoPtr->ColorBar);
365 if (infoPtr->ColorBk == CLR_DEFAULT)
366 pdi.hbrBk = GetSysColorBrush(COLOR_3DFACE);
368 pdi.hbrBk = CreateSolidBrush(infoPtr->ColorBk);
370 /* get the window style */
371 dwStyle = GetWindowLongW (infoPtr->Self, GWL_STYLE);
373 /* get client rectangle */
374 GetClientRect (infoPtr->Self, &pdi.rect);
376 FrameRect( hdc, &pdi.rect, pdi.hbrBk );
377 InflateRect(&pdi.rect, -1, -1);
380 /* compute some drawing parameters */
381 barSmooth = (dwStyle & PBS_SMOOTH) && !pdi.theme;
382 drawProcs = &((pdi.theme ? drawProcThemed : drawProcClassic)[(barSmooth ? 0 : 4)
383 + ((dwStyle & PBS_VERTICAL) ? 2 : 0)]);
384 barSize = get_bar_size( dwStyle, &pdi.rect );
387 GetWindowRect( infoPtr->Self, &pdi.bgRect );
388 ScreenToClient( infoPtr->Self, (POINT*)&pdi.bgRect );
389 ScreenToClient( infoPtr->Self, (POINT*)&pdi.bgRect.right );
393 pdi.ledW = get_led_size( infoPtr, dwStyle, &pdi.rect);
394 pdi.ledGap = get_led_gap( infoPtr );
396 if (dwStyle & PBS_MARQUEE)
398 const int ledW = !barSmooth ? (pdi.ledW + pdi.ledGap) : 1;
399 const int leds = (barSize + ledW - 1) / ledW;
400 const int ledMEnd = infoPtr->MarqueePos + MARQUEE_LEDS;
404 /* case 1: the marquee bar extends over the end and wraps around to
406 const int gapStart = max((ledMEnd - leds) * ledW, 0);
407 const int gapEnd = min(infoPtr->MarqueePos * ledW, barSize);
409 drawProcs[0]( &pdi, 0, gapStart);
410 drawProcs[1]( &pdi, gapStart, gapEnd);
411 drawProcs[0]( &pdi, gapEnd, barSize);
415 /* case 2: the marquee bar is between start and end */
416 const int barStart = infoPtr->MarqueePos * ledW;
417 const int barEnd = min (ledMEnd * ledW, barSize);
419 drawProcs[1]( &pdi, 0, barStart);
420 drawProcs[0]( &pdi, barStart, barEnd);
421 drawProcs[1]( &pdi, barEnd, barSize);
426 int barEnd = get_bar_position( infoPtr, dwStyle, &pdi.rect,
430 const int ledW = pdi.ledW + pdi.ledGap;
431 barEnd = min (((barEnd + ledW - 1) / ledW) * ledW, barSize);
433 drawProcs[0]( &pdi, 0, barEnd);
434 drawProcs[1]( &pdi, barEnd, barSize);
437 /* delete bar brush */
438 if (infoPtr->ColorBar != CLR_DEFAULT) DeleteObject (pdi.hbrBar);
439 if (infoPtr->ColorBk != CLR_DEFAULT) DeleteObject (pdi.hbrBk);
444 /* when themed, constrain the client area to the progress bar content rect. */
445 static LRESULT nc_calc_size (PROGRESS_INFO *infoPtr, WPARAM wParam,
448 HTHEME theme = GetWindowTheme (infoPtr->Self);
453 TRACE("%p\n", theme);
455 return DefWindowProcW (infoPtr->Self, WM_NCCALCSIZE, wParam, lParam);
456 dwStyle = GetWindowLongW (infoPtr->Self, GWL_STYLE);
459 TRACE("(%ld,%ld)-(%ld,%ld) -> ", r->left, r->top, r->right, r->bottom);
460 part = (dwStyle & PBS_VERTICAL) ? PP_BARVERT : PP_BAR;
461 GetThemeBackgroundContentRect (theme, 0, part, 0, r, r);
462 TRACE("(%ld,%ld)-(%ld,%ld)\n", r->left, r->top, r->right, r->bottom);
466 /* paint the progress bar backgroundm*/
467 static BOOL nc_paint (PROGRESS_INFO *infoPtr, HRGN region)
469 HTHEME theme = GetWindowTheme (infoPtr->Self);
475 if (!theme) return FALSE;
477 GetWindowRect(infoPtr->Self, &r);
479 hdc = GetDCEx(infoPtr->Self, region, DCX_WINDOW|DCX_INTERSECTRGN);
480 OffsetRect(&r, -r.left, -r.top);
482 /* get the window style */
483 dwStyle = GetWindowLongW (infoPtr->Self, GWL_STYLE);
485 part = (dwStyle & PBS_VERTICAL) ? PP_BARVERT : PP_BAR;
486 if (IsThemeBackgroundPartiallyTransparent (theme, part, 0))
487 DrawThemeParentBackground (infoPtr->Self, hdc, NULL);
488 DrawThemeBackground (theme, hdc, part, 0, &r, NULL);
489 ReleaseDC(infoPtr->Self, hdc);
494 /***********************************************************************
496 * Draw the progress bar. The background need not be erased.
497 * If dc!=0, it draws on it
499 static LRESULT PROGRESS_Paint (PROGRESS_INFO *infoPtr, HDC hdc)
502 if (hdc) return PROGRESS_Draw (infoPtr, hdc);
503 hdc = BeginPaint (infoPtr->Self, &ps);
504 PROGRESS_Draw (infoPtr, hdc);
505 EndPaint (infoPtr->Self, &ps);
510 /***********************************************************************
512 * Handle the marquee timer messages
514 static LRESULT PROGRESS_Timer (PROGRESS_INFO *infoPtr, INT idTimer)
516 if(idTimer == ID_MARQUEE_TIMER)
518 LONG style = GetWindowLongW (infoPtr->Self, GWL_STYLE);
521 HTHEME theme = GetWindowTheme (infoPtr->Self);
522 BOOL barSmooth = (style & PBS_SMOOTH) && !theme;
524 get_client_rect (infoPtr->Self, &rect);
527 ledWidth = get_led_size( infoPtr, style, &rect ) +
528 get_led_gap( infoPtr );
532 leds = (get_bar_size( style, &rect ) + ledWidth - 1) /
535 /* increment the marquee progress */
536 if(++infoPtr->MarqueePos >= leds)
538 infoPtr->MarqueePos = 0;
541 InvalidateRect(infoPtr->Self, &rect, FALSE);
547 /***********************************************************************
549 * Makes sure the current position (CurVal) is within bounds.
551 static void PROGRESS_CoercePos(PROGRESS_INFO *infoPtr)
553 if(infoPtr->CurVal < infoPtr->MinVal)
554 infoPtr->CurVal = infoPtr->MinVal;
555 if(infoPtr->CurVal > infoPtr->MaxVal)
556 infoPtr->CurVal = infoPtr->MaxVal;
560 /***********************************************************************
562 * Set new Font for progress bar
564 static HFONT PROGRESS_SetFont (PROGRESS_INFO *infoPtr, HFONT hFont, BOOL bRedraw)
566 HFONT hOldFont = infoPtr->Font;
567 infoPtr->Font = hFont;
568 /* Since infoPtr->Font is not used, there is no need for repaint */
572 static DWORD PROGRESS_SetRange (PROGRESS_INFO *infoPtr, int low, int high)
574 DWORD res = MAKELONG(LOWORD(infoPtr->MinVal), LOWORD(infoPtr->MaxVal));
576 /* if nothing changes, simply return */
577 if(infoPtr->MinVal == low && infoPtr->MaxVal == high) return res;
579 infoPtr->MinVal = low;
580 infoPtr->MaxVal = high;
581 PROGRESS_CoercePos(infoPtr);
582 InvalidateRect(infoPtr->Self, NULL, TRUE);
586 /***********************************************************************
589 static LRESULT WINAPI ProgressWindowProc(HWND hwnd, UINT message,
590 WPARAM wParam, LPARAM lParam)
592 PROGRESS_INFO *infoPtr;
593 static const WCHAR themeClass[] = {'P','r','o','g','r','e','s','s',0};
596 TRACE("hwnd=%p msg=%04x wparam=%x lParam=%lx\n", hwnd, message, wParam, lParam);
598 infoPtr = (PROGRESS_INFO *)GetWindowLongPtrW(hwnd, 0);
600 if (!infoPtr && message != WM_CREATE)
601 return DefWindowProcW( hwnd, message, wParam, lParam );
606 DWORD dwExStyle = GetWindowLongW (hwnd, GWL_EXSTYLE);
607 dwExStyle &= ~(WS_EX_CLIENTEDGE | WS_EX_WINDOWEDGE);
608 dwExStyle |= WS_EX_STATICEDGE;
609 SetWindowLongW (hwnd, GWL_EXSTYLE, dwExStyle);
610 /* Force recalculation of a non-client area */
611 SetWindowPos(hwnd, 0, 0, 0, 0, 0,
612 SWP_FRAMECHANGED | SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
614 /* allocate memory for info struct */
615 infoPtr = (PROGRESS_INFO *)Alloc (sizeof(PROGRESS_INFO));
616 if (!infoPtr) return -1;
617 SetWindowLongPtrW (hwnd, 0, (DWORD_PTR)infoPtr);
619 /* initialize the info struct */
620 infoPtr->Self = hwnd;
622 infoPtr->MaxVal = 100;
625 infoPtr->MarqueePos = 0;
626 infoPtr->Marquee = FALSE;
627 infoPtr->ColorBar = CLR_DEFAULT;
628 infoPtr->ColorBk = CLR_DEFAULT;
631 OpenThemeData (hwnd, themeClass);
633 TRACE("Progress Ctrl creation, hwnd=%p\n", hwnd);
638 TRACE("Progress Ctrl destruction, hwnd=%p\n", hwnd);
640 SetWindowLongPtrW(hwnd, 0, 0);
641 theme = GetWindowTheme (hwnd);
642 CloseThemeData (theme);
649 return nc_calc_size (infoPtr, wParam, lParam);
652 if (!nc_paint (infoPtr, (HRGN)wParam))
653 return DefWindowProcW( hwnd, message, wParam, lParam );
657 return (LRESULT)infoPtr->Font;
660 return (LRESULT)PROGRESS_SetFont(infoPtr, (HFONT)wParam, (BOOL)lParam);
663 return PROGRESS_Paint (infoPtr, (HDC)wParam);
666 return PROGRESS_Timer (infoPtr, (INT)wParam);
668 case WM_THEMECHANGED:
669 theme = GetWindowTheme (hwnd);
670 CloseThemeData (theme);
671 OpenThemeData (hwnd, themeClass);
672 InvalidateRect (hwnd, NULL, FALSE);
678 oldVal = infoPtr->CurVal;
680 infoPtr->CurVal += (INT)wParam;
681 PROGRESS_CoercePos (infoPtr);
682 TRACE("PBM_DELTAPOS: current pos changed from %d to %d\n", oldVal, infoPtr->CurVal);
683 PROGRESS_Invalidate( infoPtr, oldVal, infoPtr->CurVal );
691 oldVal = infoPtr->CurVal;
692 if(oldVal != wParam) {
693 infoPtr->CurVal = (INT)wParam;
694 PROGRESS_CoercePos(infoPtr);
695 TRACE("PBM_SETPOS: current pos changed from %d to %d\n", oldVal, infoPtr->CurVal);
696 PROGRESS_Invalidate( infoPtr, oldVal, infoPtr->CurVal );
702 return PROGRESS_SetRange (infoPtr, (int)LOWORD(lParam), (int)HIWORD(lParam));
707 oldStep = infoPtr->Step;
708 infoPtr->Step = (INT)wParam;
715 oldVal = infoPtr->CurVal;
716 infoPtr->CurVal += infoPtr->Step;
717 if(infoPtr->CurVal > infoPtr->MaxVal)
718 infoPtr->CurVal = infoPtr->MinVal;
719 if(oldVal != infoPtr->CurVal)
721 TRACE("PBM_STEPIT: current pos changed from %d to %d\n", oldVal, infoPtr->CurVal);
722 PROGRESS_Invalidate( infoPtr, oldVal, infoPtr->CurVal );
728 return PROGRESS_SetRange (infoPtr, (int)wParam, (int)lParam);
732 ((PPBRANGE)lParam)->iLow = infoPtr->MinVal;
733 ((PPBRANGE)lParam)->iHigh = infoPtr->MaxVal;
735 return wParam ? infoPtr->MinVal : infoPtr->MaxVal;
738 return infoPtr->CurVal;
740 case PBM_SETBARCOLOR:
741 infoPtr->ColorBar = (COLORREF)lParam;
742 InvalidateRect(hwnd, NULL, TRUE);
746 infoPtr->ColorBk = (COLORREF)lParam;
747 InvalidateRect(hwnd, NULL, TRUE);
753 infoPtr->Marquee = TRUE;
754 SetTimer(infoPtr->Self, ID_MARQUEE_TIMER, (UINT)lParam, NULL);
758 infoPtr->Marquee = FALSE;
759 KillTimer(infoPtr->Self, ID_MARQUEE_TIMER);
761 return infoPtr->Marquee;
764 if ((message >= WM_USER) && (message < WM_APP))
765 ERR("unknown msg %04x wp=%04x lp=%08lx\n", message, wParam, lParam );
766 return DefWindowProcW( hwnd, message, wParam, lParam );
771 /***********************************************************************
772 * PROGRESS_Register [Internal]
774 * Registers the progress bar window class.
776 void PROGRESS_Register (void)
780 ZeroMemory (&wndClass, sizeof(wndClass));
781 wndClass.style = CS_GLOBALCLASS | CS_VREDRAW | CS_HREDRAW;
782 wndClass.lpfnWndProc = (WNDPROC)ProgressWindowProc;
783 wndClass.cbClsExtra = 0;
784 wndClass.cbWndExtra = sizeof (PROGRESS_INFO *);
785 wndClass.hCursor = LoadCursorW (0, (LPWSTR)IDC_ARROW);
786 wndClass.lpszClassName = PROGRESS_CLASSW;
788 RegisterClassW (&wndClass);
792 /***********************************************************************
793 * PROGRESS_Unregister [Internal]
795 * Unregisters the progress bar window class.
797 void PROGRESS_Unregister (void)
799 UnregisterClassW (PROGRESS_CLASSW, NULL);