The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: enevil on March 03, 2012, 11:56:20 AM

Title: How to show progress bar in status bar ?
Post by: enevil on March 03, 2012, 11:56:20 AM

How to show progress bar in status bar ?
                               think you.
Title: Re: How to show progress bar in status bar ?
Post by: hutch-- on March 03, 2012, 01:44:52 PM
Use the status bar handle as the parent for a progress control.
Title: Re: How to show progress bar in status bar ?
Post by: livinskull on March 03, 2012, 02:56:50 PM
And SB_GETRECT to get the dimensions ;)

Like this:
invoke CreateStatusWindow, WS_CHILD or WS_VISIBLE, NULL, hWnd, IDC_STATUS
mov hwndStatus, eax
invoke SendMessage, hwndStatus, SB_GETRECT, 0, addr r
mov ecx, r.bottom
sub ecx, r.top
mov edx, r.right
sub edx, r.left
invoke CreateWindowEx, NULL, addr szProgressClass, NULL, WS_CHILD or WS_VISIBLE, r.left, r.top, edx, ecx, hwndStatus,  0, hInstance, 0
mov hwndProgress, eax