Thread: Progress Bar in Status Bar :: No MFC

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    387

    Progress Bar in Status Bar :: No MFC

    does anyone know how to add a progress bar to a status bar?

    I have searched the forums but i couldnt find anything
    "There are three kinds of people in the world...
    Those that can count and those that can't."

  2. #2
    Registered User sean345's Avatar
    Join Date
    Mar 2002
    Posts
    346
    I found this in some source code. It might help.

    Code:
    /*------------------------------------------------------------------------
     Module:        PROGRESSBAR.H
     Author:        Daniel Guerrero Miralles
     Project:       TreeSize
     State:         zero
     Creation Date: 26/10/98
     Description:   Interface to progress bar common control.
                    Resembles the CProgressCtrl in MFC. Don't
                    forget to call "InitCommonControls()".
    ------------------------------------------------------------------------*/
    #include <windows.h>
    #include <commctrl.h>
    
    #ifndef _PROGRESSBAR_H_
    #define _PROGRESSBAR_H_
    
    /* --- Macros --- */
    
    #define ProgressBar_SetRange(hwnd,nLower,nUpper) ((void)SendMessage(hwnd,PBM_SETRANGE,(WPARAM)0,MAKELPARAM(nLower,nUpper)))
    #define ProgressBar_SetPos(hwnd,nPos) ((int)SendMessage(hwnd,PBM_SETPOS,(WPARAM)nPos,(LPARAM)0))
    #define ProgressBar_OffsetPos(hwnd,nIncrement) ((int)SendMessage(hwnd,PBM_DELTAPOS,(WPARAM)nIncrement,(LPARAM)0))
    #define ProgressBar_SetStep(hwnd,nStep) ((int)SendMessage(hwnd,PBM_SETSTEP,(WPARAM)nStep,(LPARAM)0))
    #define ProgressBar_StepIt(hwnd) ((int)SendMessage(hwnd,PBM_STEPIT,(WPARAM)0,(LPARAM)0))
    
    #define ProgressBar_Create(hwParent,hInst,nChidId,cx,cy,cw,ch) ((HWND)CreateWindow(PROGRESS_CLASS\
    	,(LPSTR)NULL,WS_CHILD|WS_VISIBLE,cx,cy,cw,ch,hwParent,(HMENU)nChildId,hInst,NULL))
    #define ProgressBar_Destroy(hwnd) ((void)DestroyWindow(hwnd))
    
    /* --- Functions --- */
    
    #endif
    - Sean
    If cities were built like software is built, the first woodpecker to come along would level civilization.
    Black Frog Studios

  3. #3
    Registered User
    Join Date
    Jan 2002
    Posts
    387
    i think that is just a progress bar, i need to know how to embed a progress bar into a status bar, thanks anyway
    "There are three kinds of people in the world...
    Those that can count and those that can't."

  4. #4
    Registered User sean345's Avatar
    Join Date
    Mar 2002
    Posts
    346
    Here is a link to msdn when I searched for a progress bar in a status bar. This might work.

    http://msdn.microsoft.com/library/de...cmthSysCmd.asp

    - Sean
    If cities were built like software is built, the first woodpecker to come along would level civilization.
    Black Frog Studios

  5. #5
    Registered User
    Join Date
    Jan 2002
    Posts
    387
    hmm i need it to be in C/C++
    "There are three kinds of people in the world...
    Those that can count and those that can't."

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. beach bar (sims type game)
    By DrKillPatient in forum Game Programming
    Replies: 1
    Last Post: 03-06-2006, 01:32 PM
  2. Troubles with Sockets
    By cornholio in forum Windows Programming
    Replies: 6
    Last Post: 10-26-2005, 05:31 AM
  3. Progress bar in a Status bar...
    By Devil Panther in forum Windows Programming
    Replies: 8
    Last Post: 07-21-2005, 02:24 AM
  4. progress bar newbie
    By WaterNut in forum Windows Programming
    Replies: 18
    Last Post: 08-09-2004, 01:42 PM
  5. Disabling "Ready" & Other Auto Status Bar Updates :: MFC
    By kuphryn in forum C++ Programming
    Replies: 1
    Last Post: 04-03-2002, 08:51 PM