Go Back   Club CDFreaks - Knowledge is Power > International Chat: Software related > Nero SDK Discussion Forum


Commercial message



Nero SDK Discussion Forum Discuss, How to Notify my application?? at International Chat: Software related forum; Hi, how can i notify my application from the static NeroSDK callbacks: IdleCallback(); ProgressCallback(); example: BOOL NERO_CALLBACK_ATTR ServiceNeroBurning::ProgressCallback(void *pUserData, DWORD dwProgressInPercent) { // here i get the error= "illegal call of non-static member function" OnProgress(dwProgressInPercent); return true; } thanks zik


Reply
 
Thread Tools
Old 17-07-2005   #1 (permalink)
New on Forum
 
Join Date: Jul 2005
Posts: 18
How to Notify my application??

Hi,

how can i notify my application from the static NeroSDK callbacks:
IdleCallback();
ProgressCallback();

example:

BOOL NERO_CALLBACK_ATTR ServiceNeroBurning::ProgressCallback(void *pUserData, DWORD dwProgressInPercent)
{
// here i get the error= "illegal call of non-static member function"
OnProgress(dwProgressInPercent);
return true;
}

thanks zik
zikman is offline   Reply With Quote
Old 18-07-2005   #2 (permalink)
New on Forum
 
Join Date: Mar 2004
Location: Herts, UK
Posts: 27
Re: How to Notify my application??

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

//Class constructor

CNeroInterface::CNeroInterface(CWnd* pOwner)
{
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,
DWORD dwProgressInPercent)
{
if(NULL != m_pWndOwner)
m_pWndOwner->SendMessageToDescendants(WM_PROGRESS,
(WPARAM)dwProgressInPercent, (LPARAM)0);

return(m_bAborted);
}

The class that handles the WM_PROGRESS message will recieve the progress bar value as its first parameter.

Hope this helps.
codekiddie is offline   Reply With Quote
Old 18-07-2005   #3 (permalink)
New on Forum
 
Join Date: Jul 2005
Posts: 18
Re: How to Notify my application??

Thanks that were helpful.

I have another q do you have some code example of a function that’s get a directory path string something like:

MapFiles(CString sDirPath)

And recursively maps all the files to the NeroSDK.

Like the Nero express do with add file/dir for burning…

Thanks zik
zikman is offline   Reply With Quote
Old 18-07-2005   #4 (permalink)
New on Forum
 
Join Date: Mar 2004
Location: Herts, UK
Posts: 27
Re: How to Notify my application??

Hi. I have answered your question in the correct thread.
codekiddie is offline   Reply With Quote
 
Reply


If you can't find where you are looking for, then become a member and get an answer fast! We have thousands of people online every moment of the day to help you! Click here



Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Drive in use by another application BLUEDRAGON Nero & InCD 5 04-03-2007 22:32
Re-authoring application? kyrcy Video Edit Software 3 19-02-2007 23:02
Application does not exit Sander___ Nero SDK Discussion Forum 2 31-07-2006 21:54
notify registered members by email of new versions? pma DVD2One 4 21-06-2003 02:11
Email Notify Software ExpressPc2k General Software 0 23-01-2002 20:10


All times are GMT +2. The time now is 07:59.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0