1. 在窗体类里面加个变量比如:
    bool m_bCancel = false;
2. 下载函数中的循环出加入判断
    while (osize > 0 &&  !m_bCancel)
3. 在需要取消的地方,比如另外的按钮事件中设置变量为true
    m_bCancel = true;