Announcement

Collapse
No announcement yet.

progress bar problems

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • progress bar problems

    Hi
    The following routines for creating and updateing a progress
    bar work fine in Windows98 but not in Windows98.Any insight would
    be appreciated.
    Eddie

    SUB progress_init(hParent AS LONG,hInstance AS LONG,PBYPOS AS LONG)
    DIM LPARAM AS LONG
    LPARAM=6553600
    HPROGRESSBAR=CREATEWINDOWEX(0,"MSCTLS_PROGRESS32","PROGRESSBAR",%WS_CHILD OR %WS_VISIBLE,_
    40,PBYPOS,300,30,hParent,%NULL,hInstance,BYVAL %NULL)
    SENDMESSAGE HPROGRESSBAR,%PBM_SETPOS, 0,0
    SENDMESSAGE HPROGRESSBAR,%PBM_SETRANGE,0,LPARAM
    SENDMESSAGE HPROGRESSBAR,%PBM_SETSTEP, 1,0
    END SUB

    SUB progress_step
    SENDMESSAGE HPROGRESSBAR,%PBM_STEPIT,0,0
    END SUB

    SUB progress_reset
    SENDMESSAGE HPROGRESSBAR,%PBM_SETPOS,0,0
    SHOWWINDOW HPROGRESSBAR,%SW_SHOW
    END SUB

    SUB progress_hide
    SHOWWINDOW HPROGRESSBAR,%SW_HIDE
    END SUB

    ------------------

  • #2
    oops!!
    I meant to say it works okay in 98 but not in 98.
    I tried updateing the common controls dll but that was not
    the problem.
    Eddie(again)

    ------------------

    Comment


    • #3
      Uhhh... can you describe the actual problem and which version of 98 it does not work on?

      Thanks!


      ------------------
      Lance
      PowerBASIC Support
      mailto:[email protected][email protected]</A>
      Lance
      mailto:[email protected]

      Comment


      • #4
        Wow!I can't say anything right this morning.
        What I have meant to say both times is that the progress bar
        works fine in Windows98 but fails(doesn't appear) in Windows95.
        Maybe I haven't had enough coffee.
        Eddie

        ------------------

        Comment


        • #5
          Ok, what is the return value of CreateWindowEx()? If zero, check GetLastError() to see the extended error code... You can look up these errors in WIN32API.INC - they start with "%ERROR_".



          ------------------
          Lance
          PowerBASIC Support
          mailto:[email protected][email protected]</A>
          Lance
          mailto:[email protected]

          Comment


          • #6
            How about another method...

            I sometimes use a label, change the font to Marlett, and fill it with the letter "g"...

            ------------------
            Dennis
            mailto:[email protected][email protected]</A>

            Comment


            • #7
              Or another, another approach. See 3D progress bar sample at http://www.tolken99.com/pb/pbfile_e.htm

              Also a DDT sample of using boring MS control there..


              ------------------

              Comment


              • #8
                Thanks for all the replys,fellow PB'ers.The support on this
                forum certainly beats Microsoft and Borland.
                I have had success using EZGUI but I have recently migrated to
                Ed Turner's Meta4GL visual designer which requires you to learn
                how to manipulate(and sometimes create) controls.I like Ed's VD
                because everything can be done from the IDE i.e. no code pasting.
                I have put together a library of common functions that I use with
                Meta4GL that I will post soon.
                Cheers/beers
                Eddie

                ------------------

                Comment


                • #9
                  Eddie,

                  I posted 3d progress bar code for Ezgui 2.0 on Chris' Code forum.
                  It's inspired by Borge's progress bar in Poffs. It works in
                  NT 4.0 win2k and 98se. Haven't tried it in 95.

                  Russ Srole

                  ------------------
                  "There are two novels that can change a bookish fourteen-year old's life: The Lord of the Rings and Atlas Shrugged. One is a childish fantasy that often engenders a lifelong obsession with its unbelievable heroes, leading to an emotionally stunted, socially crippled adulthood, unable to deal with the real world. The other, of course, involves orcs." - John Rogers

                  Comment

                  Working...
                  X