Progress bar in a Dialog Box

This is a discussion on Progress bar in a Dialog Box within the Windows Programming forums, part of the Platform Specific Boards category; Hey im trying to put this progress bar in a dialog box and this is the code ive put in ...

  1. #1
    Registered User
    Join Date
    May 2004
    Posts
    215

    Progress bar in a Dialog Box

    Hey im trying to put this progress bar in a dialog box
    and this is the code ive put in my rc file, but it doesnt seem to work. Here it is:

    Code:
    CONTROL "", ID_PROGRESS, "PROGRESS_CLASS",WS_VISIBLE | WS_CHILD, 10, 50, 200, 20
    can someone show me whats wrong with it.

  2. #2
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    PROGRESS_CLASS is a macro. Therefore, it should not be enclosed as a string.

    Also, remember to call InitCommonControls(Ex) before creating the dialog box.

  3. #3
    Registered User
    Join Date
    May 2004
    Posts
    215
    where should i declare InitCommonControls? In the rc file?

    also declaring this:
    Code:
    CONTROL "", ID_PROGRESS, PROGRESS_CLASS,WS_VISIBLE | WS_CHILD, 10, 50, 200, 20
    gave me this error:

    C:\Documents and Settings\Desktop\STP\STP\resource1.rc (120): error RC2104 : undefined keyword or key name: PROGRESS_CLASS

  4. #4
    Registered User
    Join Date
    May 2004
    Posts
    215
    nevermind, i got it :-) i just had to include "commctrl.h"

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 9
    Last Post: 02-13-2008, 01:59 PM
  2. beach bar (sims type game)
    By DrKillPatient in forum Game Programming
    Replies: 1
    Last Post: 03-06-2006, 12:32 PM
  3. New Theme
    By XSquared in forum A Brief History of Cprogramming.com
    Replies: 160
    Last Post: 04-01-2004, 07:00 PM
  4. Adding progress bar to a dialog box.
    By Brian in forum Windows Programming
    Replies: 1
    Last Post: 11-15-2002, 05:27 PM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21