I have started to make this program that uses URLDownloadToFile() to download files off the net. It download fine and everything, now i am up to the stage of trying to get a progress bar to work for the downloads.

The syntex for URLDownloadToFile is:

Code:
HRESULT URLDownloadToFile(      
    LPUNKNOWN pCaller,
    LPCTSTR szURL,
    LPCTSTR szFileName,
    DWORD dwReserved,
    LPBINDSTATUSCALLBACK lpfnCB
);
I know getting the progress bar to work has something to do with the 5th parameter and using callback, i'm just not sure what to do...

I am using c. in my resource file i have a progress bar control:

Code:
CONTROL "",IDC_PROGRESS,"msctls_progress32",WS_CHILD|WS_VISIBLE,2,168,280,15
Does anyone know how to do this, thx in advance