Took a quick peek at the code, don't forget to close thread and process handles upon successful call returns. Only mentioning this because you mentioned the word "clean" twice and these are resource leaks.
Download.cpp
download_thread() --->
CloseHandle(pInfo->hThread);
CloseHandle(pInfo->hProcess);
download_DialogProc() --->
HANDLE hThread = CreateThread(..., ..);
if (hThread) {
CloseHandle(hThread);
}
For downloading to disk as a file directly (not memory) there exists the API
URLDownloadToFile inside URLMon. Seems you likely have more of a *nix background so perhaps you weren't aware of it in the world of Windows. Would be an improvement if you added proxy and SSL support as well to it, these days it's almost required for anything done with remote sockets, and it's very simple to do with WinInet functionality.
Thanks for sharing, although I wonder if the more appropriate section of this forum is the Newbie area (can be more helpful to those learning there)