You cannot call a non-static member function from within a static function, as the ProgressCallback function is.
I send a message to the window that updates the progress bar with the dwProgressInPercent passed to it.
I store a pointer to this window in a static variable m_pWndOwner in the class constructor.
In my class header file I have:
static CWnd* m_pWndOwner;
And in the .cpp file:
CWnd* CNeroInterface::m_pWndOwner = NULL; // initialise variable
m_pWndOwner = pOwner; // m_pWndOwner now points to the window
// that handles the progress messages
// Progress Callback function
BOOL NERO_CALLBACK_ATTR CNeroInterface::ProgressCallback(void* pUserData,
if(NULL != m_pWndOwner)
The class that handles the WM_PROGRESS message will recieve the progress bar value as its first parameter.
Hope this helps.