| 39 | |
| 40 | |
| 41 | int CMeterBar::OnCreate(LPCREATESTRUCT lpCreateStruct) |
| 42 | { |
| 43 | if (CStatusBarCtrl::OnCreate(lpCreateStruct) == -1) |
| 44 | return -1; |
| 45 | |
| 46 | ASSERT(m_pWidths); |
| 47 | CStatusBarCtrl::SetParts(m_nParts, m_pWidths); |
| 48 | //int tmp; |
| 49 | //int n = GetParts(0, &tmp); |
| 50 | |
| 51 | // TODO: �ڴ�������ר�õĴ������� |
| 52 | //m_meter.Create(WS_CHILD | WS_VISIBLE, CRect(0, 0, 0, 0), this, 101); |
| 53 | //m_meter.Create("Press start timer to see me go", |
| 54 | // WS_VISIBLE | WS_CHILD | WS_EX_CLIENTEDGE, CRect(0, 0, 0, 0), this, (HMENU) 101); |
| 55 | static CString className = AfxRegisterWndClass(CS_HREDRAW | CS_VREDRAW); |
| 56 | DWORD dwExStyle = WS_EX_STATICEDGE; //WS_EX_CLIENTEDGE | WS_EX_STATICEDGE; |
| 57 | m_meter.CreateEx(dwExStyle, className, |
| 58 | "Press start timer to see me go", WS_VISIBLE | WS_CHILD, |
| 59 | CRect(0, 0, 0, 0), this, 101); |
| 60 | |
| 61 | m_meter.SetRange(0, 100); |
| 62 | m_meter.SetPos(0); |
| 63 | //m_meter.SetStep(1); |
| 64 | |
| 65 | return 0; |
| 66 | } |
| 67 | |
| 68 | void CMeterBar::OnSize(UINT nType, int cx, int cy) |
| 69 | { |