Click here to Skip to main content
15,889,909 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: 64-Bit Printer Driver vs 32-Bit Printer Driver and viceversa Pin
«_Superman_»10-Oct-10 19:02
professional«_Superman_»10-Oct-10 19:02 
GeneralRe: 64-Bit Printer Driver vs 32-Bit Printer Driver and viceversa Pin
msr_codeproject10-Oct-10 19:30
msr_codeproject10-Oct-10 19:30 
GeneralRe: 64-Bit Printer Driver vs 32-Bit Printer Driver and viceversa Pin
«_Superman_»10-Oct-10 22:06
professional«_Superman_»10-Oct-10 22:06 
AnswerRe: 64-Bit Printer Driver vs 32-Bit Printer Driver and viceversa Pin
Richard MacCutchan11-Oct-10 0:16
mveRichard MacCutchan11-Oct-10 0:16 
GeneralRe: 64-Bit Printer Driver vs 32-Bit Printer Driver and viceversa Pin
msr_codeproject11-Oct-10 1:44
msr_codeproject11-Oct-10 1:44 
GeneralRe: 64-Bit Printer Driver vs 32-Bit Printer Driver and viceversa Pin
Richard MacCutchan11-Oct-10 2:05
mveRichard MacCutchan11-Oct-10 2:05 
GeneralRe: 64-Bit Printer Driver vs 32-Bit Printer Driver and viceversa Pin
Alain Rist11-Oct-10 4:07
Alain Rist11-Oct-10 4:07 
QuestionImplementing CALLBACK in MFC getting error C2440: 'type cast' conversion problem Pin
Vaclav_10-Oct-10 16:48
Vaclav_10-Oct-10 16:48 
I need some help with this error.
I cannot compile this AVIcap function call (callback) in CView

capSetCallbackOnFrame(m_hWndCAVIFrame,FrameCallbackProc);

This is the error I am getting

error C2440: 'type cast' : cannot convert from 'long (__stdcall CMyView::*)(struct HWND__ *,struct videohdr_tag *)' to 'void *'
There is no context in which this conversion is possible

The callback is defined (per documentation) :

LRESULT CALLBACK CMyView::FrameCallbackProc(HWND hWnd, LPVIDEOHDR lpVHdr);

And implemented this way:

LRESULT CALLBACK CMyView::FrameCallbackProc(HWND hWnd, LPVIDEOHDR lpVHdr)
{ …...

I understand that the second parameter in capSetCallbackOnFrame should be a pointer to the callback function, however, I do not understand what I need in addition to “CALLBACK”.
I have tried cast to long* (capSetCallbackOnFrame(m_hWndCAVIFrame,(long*)FrameCallbackProc);) but it did not work and I really do not understand why.
Any constructive help is as always appreciated.
Thanks for your time.
Vaclav
AnswerRe: Implementing CALLBACK in MFC getting error C2440: 'type cast' conversion problem Pin
Tim Craig10-Oct-10 17:23
Tim Craig10-Oct-10 17:23 
GeneralRe: Implementing CALLBACK in MFC getting error C2440: 'type cast' conversion problem Pin
Vaclav_10-Oct-10 17:54
Vaclav_10-Oct-10 17:54 
GeneralRe: Implementing CALLBACK in MFC getting error C2440: 'type cast' conversion problem Pin
Tim Craig10-Oct-10 22:06
Tim Craig10-Oct-10 22:06 
GeneralRe: Implementing CALLBACK in MFC getting error C2440: 'type cast' conversion problem [modified] Pin
Vaclav_11-Oct-10 2:57
Vaclav_11-Oct-10 2:57 
GeneralRe: Implementing CALLBACK in MFC getting error C2440: 'type cast' conversion problem Pin
Tim Craig11-Oct-10 9:42
Tim Craig11-Oct-10 9:42 
GeneralRe: Implementing CALLBACK in MFC getting error C2440: 'type cast' conversion problem Pin
Vaclav_11-Oct-10 12:45
Vaclav_11-Oct-10 12:45 
QuestionNot able to register a C++ service Pin
Aseem Sharma10-Oct-10 16:39
Aseem Sharma10-Oct-10 16:39 
AnswerRe: Not able to register a C++ service Pin
Aescleal10-Oct-10 22:34
Aescleal10-Oct-10 22:34 
GeneralRe: Not able to register a C++ service Pin
Aseem Sharma11-Oct-10 17:43
Aseem Sharma11-Oct-10 17:43 
QuestionDetection if computer is a standalone system or is part of a local network system Pin
sdancer759-Oct-10 23:01
sdancer759-Oct-10 23:01 
AnswerRe: Detection if computer is a standalone system or is part of a local network system Pin
Moak14-Oct-10 9:23
Moak14-Oct-10 9:23 
GeneralRe: Detection if computer is a standalone system or is part of a local network system Pin
sdancer7514-Oct-10 23:39
sdancer7514-Oct-10 23:39 
GeneralRe: Detection if computer is a standalone system or is part of a local network system Pin
Moak17-Oct-10 10:24
Moak17-Oct-10 10:24 
GeneralRe: Detection if computer is a standalone system or is part of a local network system Pin
sdancer7518-Oct-10 6:35
sdancer7518-Oct-10 6:35 
GeneralRe: Detection if computer is a standalone system or is part of a local network system Pin
Moak18-Oct-10 10:41
Moak18-Oct-10 10:41 
QuestionConvert COleDateTime to SQL datetime column type Pin
Md Saleem Navalur9-Oct-10 4:10
Md Saleem Navalur9-Oct-10 4:10 
AnswerRe: Convert COleDateTime to SQL datetime column type Pin
Md Saleem Navalur9-Oct-10 6:55
Md Saleem Navalur9-Oct-10 6:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.