Thanks Chen,
I'll have a detailed look at this tomorrow.
Cheers
Martin
On Sat, Apr 16, 2011 at 5:17 AM, Chen Xiajian <chenxiajian1985@gmail.com> wrote:
> Hi, all.
> The attachment is the patch file that I implement the Pulsing progress
> bar in Windows and the screenshot. I have checked in
> my computer, it works well.
> The places I modified:
> ======================1 pd_Document.cpp=========
> In Windows there is not function like gtk "gtk_progress_bar_pulse" we
> do like this:
> 1. set the process bar style to PBS_MARQUEE
> 2. change the notify function. the varible "m_isMARQUEEState" is used
> to control the pluse state
> use dwStyle&=~PBS_MARQUEE; and dwStyle|=PBS_MARQUEE; to control the
> process bar's style
> void ap_usb_ProgressListener::notify()
> {
> if(pProgress->isDefinate())
> {
> if(m_isMARQUEEState)
> {
> DWORD dwStyle;
> dwStyle=GetWindowLong(m_ProgressWND, GWL_STYLE);
> dwStyle&=~PBS_MARQUEE;
> SetWindowLong(m_ProgressWND, GWL_STYLE, dwStyle );
> m_isMARQUEEState=false;
> }
> double fraction = pProgress->getFraction();
> SendMessage(m_ProgressWND,PBM_SETPOS,fraction*100,0);
> }
> else
> {
> if(!m_isMARQUEEState)
> {
> DWORD dwStyle;
> dwStyle=GetWindowLong(m_ProgressWND, GWL_STYLE);
> dwStyle|=PBS_MARQUEE;
> SetWindowLong(m_ProgressWND, GWL_STYLE, dwStyle );
> SendMessage(m_ProgressWND,PBM_SETMARQUEE,1,100);
> m_isMARQUEEState=true;
> }
> }
> }
> ======================2 pd_Document.cpp=========
> Because the Pulsing progress bar in windows need to be update
> manually, so I change the updateRate.
> UT_sint32 updateRate =200;--> UT_sint32 updateRate =20;
> 200 don't has a good effect
>
> ===============================================
> If there is some other functon need to be implemented in Windows, pls
> tell me,I can implement it!
>
>
> Thanks
> Chen Xiajian
>
Received on Sat Apr 16 10:12:26 2011
This archive was generated by hypermail 2.1.8 : Sat Apr 16 2011 - 10:12:26 CEST