Click here to Skip to main content
       

C / C++ / MFC

 
GeneralRe: Pop up window from a dialog based application PinmemberMember 80516115-Feb-13 1:03 
GeneralRe: Pop up window from a dialog based application PinmvpRichard MacCutchan5-Feb-13 1:33 
GeneralRe: Pop up window from a dialog based application PinmemberMember 80516115-Feb-13 17:47 
GeneralRe: Pop up window from a dialog based application PinmvpRichard MacCutchan5-Feb-13 21:10 
GeneralRe: Pop up window from a dialog based application PinmemberMember 80516116-Feb-13 22:45 
GeneralRe: Pop up window from a dialog based application PinmvpRichard MacCutchan6-Feb-13 23:43 
GeneralRe: Pop up window from a dialog based application PinmemberMember 80516117-Feb-13 0:29 
GeneralRe: Pop up window from a dialog based application PinmvpRichard MacCutchan7-Feb-13 0:50 
GeneralRe: Pop up window from a dialog based application PinmemberMember 805161111-Feb-13 19:55 
GeneralRe: Pop up window from a dialog based application PinmemberMember 80516115-Feb-13 19:33 
AnswerRe: Pop up window from a dialog based application PinmemberAlbert Holguin4-Feb-13 12:18 
QuestionHow to Implement Drag & Drop feature for Imagesin MFC.? Pinmembermbatra313-Feb-13 19:17 
AnswerRe: How to Implement Drag & Drop feature for Imagesin MFC.? PinmemberJochen Arndt3-Feb-13 21:46 
QuestionStuck in WaveInProc PinmemberAmbiguousName2-Feb-13 7:21 
Hello guys. I am trying to write a small recording program but am stuck in basics. I can not pass the pointer of the WaveInProc function properly. I am trying it in two ways, both of them widely used on online examples.
1 - rResult = ::waveInOpen(&phWaveIn, WAVE_MAPPER, &pcmWaveFormat, (DWORD)WaveInProc, 0, CALLBACK_FUNCTION);
 
2 - rResult = ::waveInOpen(&phWaveIn, WAVE_MAPPER, &pcmWaveFormat, (DWORD)&WaveInProc, 0, CALLBACK_FUNCTION);
 
// then tried this one as well, generating error c2440
3 - rResult = ::waveInOpen(&phWaveIn, WAVE_MAPPER, &pcmWaveFormat, (DWORD)(VOID*)WaveInProc, 0, CALLBACK_FUNCTION);
Their corresponding error messages are shown as under
1 - error C2440: 'type cast' : cannot convert from 'void (__stdcall CWaveApiDlg::* )(HWAVEIN,UINT,DWORD,DWORD,DWORD)' to 'DWORD'
 
2 - error C2276: '&' : illegal operation on bound member function expression
This is what WaveInProc looks like in my .cpp file
void CALLBACK WaveInProc(HWAVEIN hDevice, UINT uMsg, DWORD dwInstance, DWORD dwParam1, DWORD dwParam2)
{
}
Everything seems to be fine ... what is wrong here? Thanks for any help.

This world is going to explode due to international politics, SOON.

AnswerRe: Stuck in WaveInProc PinmvpCPallini2-Feb-13 10:38 
AnswerRe: Stuck in WaveInProc PinmvpRichard MacCutchan2-Feb-13 21:26 
QuestionBitmap creation from a buffer recived Pinmembertoms from newdelhi1-Feb-13 0:03 
AnswerRe: Bitmap creation from a buffer recived PinmvpRichard MacCutchan1-Feb-13 0:40 
GeneralRe: Bitmap creation from a buffer recived Pinmembertoms from newdelhi1-Feb-13 0:56 
GeneralRe: Bitmap creation from a buffer recived PinmvpRichard MacCutchan1-Feb-13 1:01 
GeneralRe: Bitmap creation from a buffer recived Pinmembertoms from newdelhi1-Feb-13 1:18 
GeneralRe: Bitmap creation from a buffer recived PinmvpRichard MacCutchan1-Feb-13 1:35 
GeneralRe: Bitmap creation from a buffer recived Pinmembertoms from newdelhi1-Feb-13 1:46 
GeneralRe: Bitmap creation from a buffer recived PinmvpRichard MacCutchan1-Feb-13 2:35 
GeneralRe: Bitmap creation from a buffer recived Pinmemberjibesh1-Feb-13 8:03 
QuestionMFC and printing PinmemberArgonia31-Jan-13 5:43 
AnswerRe: MFC and printing Pinmembersujayg1-Feb-13 16:21 
QuestionMFC Smart Device App with Visual C++ in Visual Std 2008 Pinmembersefasolak31-Jan-13 3:09 
AnswerRe: MFC Smart Device App with Visual C++ in Visual Std 2008 PinmvpRichard MacCutchan31-Jan-13 3:45 
Questionunable to register COM dll 64 bit Pinmemberjohn563231-Jan-13 2:12 
AnswerRe: unable to register COM dll 64 bit Pinmember«_Superman_»1-Feb-13 16:59 
QuestionPlay Media File Pinmemberjohn563230-Jan-13 19:38 
AnswerRe: Play Media File PinmemberFlaviu230-Jan-13 21:47 
GeneralRe: Play Media File Pinmemberjohn563231-Jan-13 1:07 
AnswerRe: Play Media File Pinmemberjeron131-Jan-13 4:28 
GeneralRe: Play Media File Pinmemberjohn563231-Jan-13 17:09 
GeneralRe: Play Media File Pinmemberjeron11-Feb-13 7:27 
GeneralRe: Play Media File Pinmembermerano1-Feb-13 14:11 
QuestionTCP Server: Render the image on server side Pinmembertoms from newdelhi30-Jan-13 1:29 
AnswerRe: TCP Server: Render the image on server side PinmvpRichard MacCutchan30-Jan-13 3:01 
GeneralRe: TCP Server: Render the image on server side Pinmembertoms from newdelhi30-Jan-13 16:44 
GeneralRe: TCP Server: Render the image on server side PinmvpRichard MacCutchan30-Jan-13 21:52 
GeneralRe: TCP Server: Render the image on server side Pinmembertoms from newdelhi30-Jan-13 22:53 
GeneralRe: TCP Server: Render the image on server side PinmvpRichard MacCutchan30-Jan-13 22:56 
GeneralRe: TCP Server: Render the image on server side Pinmembertoms from newdelhi30-Jan-13 22:59 
GeneralRe: TCP Server: Render the image on server side PinmvpRichard MacCutchan30-Jan-13 23:08 
AnswerRe: TCP Server: Render the image on server side PinmemberErudite_Eric30-Jan-13 3:13 
GeneralRe: TCP Server: Render the image on server side PinmvpRichard MacCutchan30-Jan-13 4:35 
GeneralRe: TCP Server: Render the image on server side PinmemberErudite_Eric30-Jan-13 5:01 
GeneralRe: TCP Server: Render the image on server side Pinmembertoms from newdelhi30-Jan-13 16:47 

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

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


Advertise | Privacy | Mobile
Web03 | 2.8.140821.2 | Last Updated 23 Aug 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid