Thread: Progressbar inside of Listbox

  1. #1
    Registered User
    Join Date
    Jul 2009
    Posts
    2

    Question Progressbar inside of Listbox

    Hey there ^.^

    ive been quite a while googling without decent results, and if a link seemed promising, its dead lol

    Well i guess my problem is easy to extract out of the title.
    I want to put a progress bar (msctls_progress32) inside a columned list box (via LB_SETTABSTOPS), for example into the last.
    I only need some startup help like links or keywords to google with, since (like i said above) my searches end up resultless.

    And pls (if possible) spare me with this moron-invention called MFC :P

    Thx in advance

    EDIT:
    like this: http://h.imagehost.org/view/0338/pb_in_lb
    but it doesnt need to be that emblazed ^.^
    Last edited by SlySS; 07-22-2009 at 03:34 AM.

  2. #2
    Registered User
    Join Date
    Dec 2007
    Posts
    214
    Is there a reason it must be a listbox? Its easy to do with a list control, and there are working examples to be easily found. You also get "real" columns.

    One example : CodeGuru: Embed Progress Bars in a List Control

  3. #3
    Registered User
    Join Date
    Jul 2009
    Posts
    2
    Thx for your answer and sry that i need that long to answer, got problems with my electricity after yesterday's thunderstorm >.< ^^

    Well, didnt know that i gotta go with List Control, but isnt there a possibility to do so without MFC.
    I was googling again (this time with ListControl), but all i find are solutions with MFC, and i rly dislike it, i prefer the good old fashion DLGPROC, since thats where u still know what exactly is going on

    Edit: Question solved, Thx
    Last edited by SlySS; 07-23-2009 at 03:15 PM.

  4. #4
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    Create a progressbar as a child of the listbox, the same size as the listbox item and in the same spot when the timed operation starts.

    The timed operation will have to post an update to the parent windows callback (redraw progressbar),
    the parents reflect via WM_NOTIFY msgs to the listbox,
    and then the listbox reflect these to the correct progressbar.

    Don't forget to process size, move, close, etc msgs from/for the window, listbox and progressbars.

    You could use the WIN32 versions of the MFC calls in that example.

    Quote Originally Posted by SlySS View Post
    And pls (if possible) spare me with this moron-invention called MFC :P
    As MFC is just a wrapper around WIN32.

    MFC is much more error tolerant than WIN32.
    MFC annoys me sometimes but then I just bypass it and use WIN32.
    MFC is excellent for RAD.

    I use the right tool for the job, irregardless of my personal feeling about it.
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. variables when declared inside or outside a function
    By jas_atwal in forum C Programming
    Replies: 6
    Last Post: 12-14-2007, 02:42 PM
  2. Still battling with Copy Control
    By Mario F. in forum C++ Programming
    Replies: 9
    Last Post: 06-23-2006, 08:04 AM
  3. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  4. How to cast a ListBox item to an int for a switch statment?
    By Swaine777 in forum C++ Programming
    Replies: 8
    Last Post: 09-26-2004, 08:52 PM
  5. Getting FULL filename from listbox
    By Garfield in forum Windows Programming
    Replies: 8
    Last Post: 01-27-2002, 08:28 AM