#include <progressbar.h>
Public Methods | |
| CProgStatusBar () | |
| virtual | ~CProgStatusBar () |
| CProgressCtrl & | GetProgressCtrl () |
| void | OnProgress (UINT udPos) |
| void | OnProgressMinMax (int minPos, int maxPos) |
Protected Methods | |
| afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct) |
| afx_msg void | OnSize (UINT nType, int cx, int cy) |
Protected Attributes | |
| CProgressCtrl | m_wndProgBar |
|
|
Definition at line 19 of file progressbar.cpp.
00020 {
00021 }
|
|
|
Definition at line 23 of file progressbar.cpp.
00024 {
00025 }
|
|
|
Definition at line 10 of file progressbar.h. References m_wndProgBar.
00010 {
00011 return m_wndProgBar;
00012 }
|
|
|
Definition at line 30 of file progressbar.cpp. References m_wndProgBar.
00031 {
00032 lpcs->style |= WS_CLIPCHILDREN;
00033 VERIFY(CStatusBar::OnCreate(lpcs) == 0);
00034 VERIFY(m_wndProgBar.Create(WS_CHILD, CRect(), this, 1));
00035 m_wndProgBar.SetRange(0,100);
00036 return 0;
00037 }
|
|
|
Definition at line 61 of file progressbar.cpp. References m_wndProgBar. Referenced by CMainFrame::OnProgress().
00062 {
00063 CProgressCtrl& pc = m_wndProgBar;
00064 DWORD dwOldStyle = pc.GetStyle();
00065 DWORD dwNewStyle = dwOldStyle;
00066 if (udPos > 0)
00067 // positive progress: show prog bar
00068 dwNewStyle |= WS_VISIBLE;
00069 else
00070 // prog <= 0: hide prog bar
00071 dwNewStyle &= ~WS_VISIBLE;
00072
00073 if (dwNewStyle != dwOldStyle) {
00074 // change state of hide/show
00075 SetWindowText(NULL); // clear old text
00076 SetWindowLong(pc.m_hWnd, GWL_STYLE, dwNewStyle); // change style
00077 }
00078
00079 // set progress bar position
00080 pc.SetPos(udPos);
00081 if (udPos == 0)
00082 // display MFC idle (ready) message.
00083 GetParent()->PostMessage(WM_SETMESSAGESTRING, AFX_IDS_IDLEMESSAGE);
00084 }
|
|
||||||||||||
|
Definition at line 87 of file progressbar.cpp. References m_wndProgBar. Referenced by CMainFrame::OnProgressMinMax().
00087 {
00088 m_wndProgBar.SetPos(0);
00089 m_wndProgBar.SetRange(minPos, maxPos);
00090 } |
|
||||||||||||||||
|
Definition at line 44 of file progressbar.cpp. References m_wndProgBar.
00045 {
00046 CStatusBar::OnSize(nType, cx, cy); // call base class
00047 CRect rc; // rectangle
00048 GetItemRect(0, &rc); // item 0 = first pane, "ready" message
00049 m_wndProgBar.MoveWindow(&rc,FALSE);// move progress bar
00050 }
|
|
|
Definition at line 17 of file progressbar.h. Referenced by GetProgressCtrl(), OnCreate(), OnProgress(), OnProgressMinMax(), and OnSize(). |
1.3-rc2