| |||||||
| Commercial message | |
| | |
|
![]() |
| | Thread Tools |
| | #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 |
| | |
| | #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. |
| | |
| | #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 |
| | |
| |
| |
![]() |
| 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 | |
| |
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 |