#include "SRProgress.h" #include "SRApp.h" #include using namespace SRFramework; SRProgress::SRProgress(void) { INITCOMMONCONTROLSEX InitCtrlEx; InitCtrlEx.dwSize = sizeof(INITCOMMONCONTROLSEX); InitCtrlEx.dwICC = ICC_TAB_CLASSES; InitCommonControlsEx(&InitCtrlEx); m_hInstance = SRFramework::SRApp::GetInstanceHandle(); m_wcsClassName = PROGRESS_CLASS; m_wcsWindowName = ""; } SRProgress::~SRProgress(void) { } BOOL SRProgress::Create(SRWnd *pParentWnd, RECT bounds, INT nChildID, DWORD dwStyle) { if(!Register()) return FALSE; if(!SRWnd::Create(m_wcsClassName,m_wcsWindowName, dwStyle, bounds, pParentWnd, (HMENU)nChildID, m_hInstance)) return FALSE; return TRUE; } INT SRProgress::SetPosition(INT nNewPos) { return ::SendMessage(m_hWnd, PBM_SETPOS, nNewPos, 0); }