win 32接口直接创建进度条不使用C Progress控件
m_hBarWnd = CreateWindow(
PROGRESS_CLASS, //windows 进度条窗口类
_T(""),
WS_CHILD | WS_VISIBLE, // | PBS_MARQUEE
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
hWnd,
NULL,
NULL,
NULL
);
SendMessage(hwnd, PBM_SETRANGE, 0, MAKELPARAM(0, 100)); //设置进度条的范围
//SendMessage(hwnd, PBS_MARQUEE, 1, 0); //设置PBS_MARQUEE 是滚动效果
SendMessage(hwnd, PBM_SETPOS, 90, (LPARAM)0); //设置进度
SendMessage(hwnd, PBM_GETRANGE, TRUE, (LPARAM)&range); //获取进度条的范围