Articles   Members Online:
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
ow to use PBM_SETMARQUEE and PBS_MARQUEE in Delphi Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
31-Oct-02
Category
VCL-General
Language
Delphi 2.x
Views
20
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
DSP, Administrator
Reference URL:
DKB
			Author: Tomas Rutkauskas

According to Microsoft you could use a progress bar with style set to PBS_MARQUEE 
if you don't know the final value. It will show a progress bar with only a gradient 
going from left to right. I find no other references to these constants except from 
MSDN. Anyone know how to use them in Delphi?

Answer:

It's defined in CommCtrl.h:

#if (_WIN32_WINNT >= 0x0501)
#define PBS_MARQUEE             0x08
#define PBM_SETMARQUEE          (WM_USER+10)
#endif      // _WIN32_WINNT >= 0x0501

In Delphi (untested):

1   { ... }
2   const
3     PBS_MARQUEE = $08;
4     PBM_SETMARQUEE = (WM_USER + 10);
5   
6   You set this style by subclassing the TProgressBar.CreateParams methods and setting 
7   PBS_MARQUEE:
8   
9   procedure TMyProgressBar.CreateParams(var Params: TCreateParams);
10  begin
11    inherited CreateParams(Params);
12    Params.Style := Params.Style or PBS_MARQUEE;
13  end;
14  
15  //You can now turn on the marquee:
16  
17  SendMessage(MyProgressBar1.Handle, PBS_SETMARQUEE, 1, 200);
18  
19  //and off:
20  
21  SendMessage(MyProgressBar1.Handle, PBS_SETMARQUEE, 0, 200);


The 200 is the number of milliseconds between animation updates.

			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC