EVC 之進度條使用

來源:互聯網
上載者:User

作者:wogoyixikexie@gliet

    ————————————————————————————————

   我已經實現在wince下實現更新NK的flash驅動和EVC程式,但是這個EVC程式介面比較差勁,想加一些進度條給它,現在開始嘗試。汪兵的書裡面有些介紹,在這裡先看看吧。

=======================================================================

現在再來看看EVC的協助文檔

——————————————

Setting the Range and Current Position

The range of a progress bar represents the entire duration of the operation, and the current position represents the progress that the application has made toward completing the operation. The window procedure uses the range and the current position of the progress bar to determine the percentage of the progress bar to fill with the highlight color, as well as to determine what text, if any, to display within the progress bar.

If you do not set the range values, the system sets the minimum value to zero and the maximum value to 100. You can adjust the range to convenient integers by using the PBM_SETRANGE message.

A progress bar provides several messages that you can use to set the current position. The PBM_SETPOS message sets the position to a specified value. The PBM_DELTAPOS message advances the position by adding a specified value to the current position. The PBM_SETSTEP message enables you to specify a step increment for a progress bar. Subsequently, when you send the PBM_STEPIT message to the progress bar, the current position advances by the specified increment. The default step increment is 10.

Note   The range values in a progress bar are considered signed integers. Any number that is greater than 0x7FFFFFFF is interpreted as a negative number

 

 

This method creates the progress bar control attached to this CProgressCtrl object.

To construct a CProgressCtrl object, call the constructor, which creates the CProgressCtrl object; then call Create.

BOOL Create( DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID ); 

Return Value

TRUE if the CProgressCtrl object is successfully created; otherwise, it is FALSE.

Parameters

dwStyle
Specifies the style of the progress bar control. Apply any combination of window styles described in CreateWindow, in addition to the following progress bar control styles, to the control:

  • PBS_VERTICAL   Displays progress information vertically, top to bottom. Without this flag, the progress bar control displays horizontally, left to right.
  • PBS_SMOOTH   Displays gradual, smooth filling in the progress bar control. Without this flag, the control will fill with blocks.
rect
Specifies the size and position of the progress bar control. It can be either a CRect object or a RECT structure. Because the control must be a child window, the specified coordinates are relative to the client area of the pParentWnd.
pParentWnd
Specifies the parent window of the progress bar control, usually a CDialog. It must not be NULL.
nID
Specifies the progress bar control ID.

Example

CProgressCtrl myCtrl;// Create a smooth child progress control.myCtrl.Create(WS_CHILD|WS_VISIBLE|PBS_SMOOTH, CRect(10,10,200,30),   pParentWnd, 1);

Requirements

  Windows CE versions: 1.0 and later  
  Header file: Declared in Afxcmn.h

 

遇到問題:在論壇發了文章,解決了。http://topic.csdn.net/u/20081225/11/83c3d669-dd33-4510-a7db-c614054a92cf.html

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.