Hi,
Would anyone be able to show me how to make the progress bar have a smooth appearance and is there a way to change the color?
Thank you,
Barry
Posted on 2002-11-29 20:07:03 by bgong68
A smooth progress bar is made by including the PBS_SMOOTH window style.

Bar color : invoke SendMessage, BarHwnd, PBM_SETBARCOLOR, 0, RGB
Back color: invoke SendMessage, BarHwnd, PBM_SETBKCOLOR, 0, RGB
Posted on 2002-11-29 21:01:16 by Graebel
Hi Graebel,
Do I include PBS_SMOOTH when I am creating the progress bar? If yes, can you please show me where to place it in the code below?


invoke CreateWindowEx,\ ;create progress bar
NULL,\
ADDR ProgressClass,\ ;class name
NULL,\
WS_CHILD+WS_VISIBLE,\
23,\ ;left position
13,\ ;top position
201,\ ;width
15,\ ;height
hwnd,\ ;main window handle
IDC_PROGRESS,\ ;control ID
hInstance,\ ;instance of APP
NULL

Thanks for your help,
Barry
Posted on 2002-11-30 20:54:59 by bgong68
bgong68, think about the word 'WS_CHILD' what do you think
the 'WS' stands for? ( ;) ) and since PBS_SMOOTH is a window style just
include it together with the other window styles. (PBS == Progress Bar Style)


invoke CreateWindowEx,\ ;create progress bar
NULL,\
ADDR ProgressClass,\ ;class name
NULL,\
WS_CHILD+WS_VISIBLE+PBS_SMOOTH,\
23,\ ;left position
13,\ ;top position
201,\ ;width
15,\ ;height
hwnd,\ ;main window handle
IDC_PROGRESS,\ ;control ID
hInstance,\ ;instance of APP
NULL
Posted on 2002-11-30 21:05:02 by natas
Hi Natas,
Thanks for showing me where to place it. Would you be kind enough to give me the equate of PBS_SMOOTH. I tried it and it did not work. I do not have PBS_SMOOTH in my windows.inc file.
Thank you,
Barry
Posted on 2002-11-30 21:15:51 by bgong68
PBS_SMOOTH equ 1
Posted on 2002-11-30 21:19:12 by natas
Hi Natas,
Thanks for taking the time to help me out. I owe you one.
Barry ^_^
Posted on 2002-11-30 21:23:25 by bgong68
Glad I could help you out! but maybe nextime when your looking for information on
things related to the windows api. I would recommend looking here first: http://msdn.microsoft.com

If you search for ex. 'Progress Bar Styles' you'll get a description of different styles
for that control. The knowledge you can find about the api is only limited by the keywords
used in your search. ( ;) )
Posted on 2002-11-30 21:29:58 by natas
Hi Natas,
I greatly appreciate you pointing me in the right direction. The only problem is how did you find the equate for PBS_SMOOTH? I am now trying to find the equate for PBS_VERTICAL just to add it to my windows.inc file for future use but have not been successful.
Barry
Posted on 2002-12-01 08:54:33 by bgong68
bgong68, I have made a thread where you can get the little tool im using. ( :) )
http://www.asmcommunity.net/board/showthread.php?threadid=9281
PBS_VERTICAL equ 4
Posted on 2002-12-01 09:34:00 by natas
Hi Natas,
Thanks for sharing that download. I am absolutely sure it will come in handy.
Barry ^_^
Posted on 2002-12-01 11:45:27 by bgong68
Hi Natas,
How do you get the API viewer to show the Assembly syntax instead of the VB syntax. I have downloaded both files but it only shows the VB syntax.
Thanks,
Barry
Posted on 2002-12-02 05:41:20 by bgong68
bgong68, Have you installed the MASM syntax plugin?
If not just execute it, and point it to the path where you installed
ApiViewer(if you didnt use the default path).

In ApiViewer goto the menu 'File->Options...->' 'General' tab, 'Settings' frame,
and choose the syntax from the 'Combobox' list. ( :) )
Posted on 2002-12-02 06:56:42 by natas
Hi Natas,
Once again you have saved the day.
Thanks,
Barry ^_^
Posted on 2002-12-02 20:54:36 by bgong68