Click here to Skip to main content
15,898,035 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionDisable the close Button of a MFC Dockable Panes Pin
m_code25-Jul-10 11:45
m_code25-Jul-10 11:45 
QuestionwaveInOpen() problum?? Pin
AmbiguousName25-Jul-10 9:30
AmbiguousName25-Jul-10 9:30 
hello guys....im new to this. I have a mic attached to my PC. Now following code should show appropriate message but it does't.
/////// some declarations
const int NUMPTS = 8000 * 10;
int sampleRate = 8000;
short int waveIn[NUMPTS];
HWAVEIN hWaveIn;
WAVEHDR WaveInHdr;
MMRESULT result = 0;

// waveInProc function....
void CALLBACK waveInProc(HWAVEIN hwi,UINT msg, DWORD dwInstance, DWORD dwArg1, DWORD dwArg2) {
	
	switch(msg) {
		case WIM_OPEN:
			MessageBox(NULL,"Device Opened Successfuly","Device Opened",NULL);
			break;
		case WIM_DATA:
			MessageBox(NULL,"Data Recieving","data",NULL);
			break;
		case WIM_CLOSE:
			MessageBox(NULL,"Device Closed Successfuly","Device Closed",NULL);
			break;
		default:
			break;
	}
}

void CwaveFileDlg::OnOpenDev() //button using which the input device is opened
{
	CFile file;
	CFileException cfe;
	TCHAR* filename = "d:\\file.wav";
	WAVEFORMATEX pFormat;//assume that values are set correctly

	if (!file.Open(filename,CFile::modeCreate|CFile::modeReadWrite,&cfe))
		MessageBox("File could't be opened","",cfe.m_cause);

	result = waveInOpen(&hWaveIn,WAVE_MAPPER,&pFormat,(DWORD_PTR) waveInProc,(DWORD_PTR) this,(DWORD)WAVE_FORMAT_DIRECT);
}

what can be the reason??
AnswerRe: waveInOpen() problum?? Pin
Luc Pattyn25-Jul-10 9:37
sitebuilderLuc Pattyn25-Jul-10 9:37 
GeneralRe: waveInOpen() problum?? Pin
AmbiguousName25-Jul-10 9:54
AmbiguousName25-Jul-10 9:54 
GeneralRe: waveInOpen() problum?? Pin
Luc Pattyn25-Jul-10 10:00
sitebuilderLuc Pattyn25-Jul-10 10:00 
GeneralRe: waveInOpen() problum?? Pin
AmbiguousName25-Jul-10 10:03
AmbiguousName25-Jul-10 10:03 
AnswerRe: waveInOpen() problum?? Pin
Luc Pattyn25-Jul-10 10:09
sitebuilderLuc Pattyn25-Jul-10 10:09 
GeneralRe: waveInOpen() problum?? Pin
AmbiguousName25-Jul-10 10:15
AmbiguousName25-Jul-10 10:15 
GeneralRe: waveInOpen() problum?? Pin
Luc Pattyn25-Jul-10 10:32
sitebuilderLuc Pattyn25-Jul-10 10:32 
GeneralRe: waveInOpen() problum?? Pin
AmbiguousName25-Jul-10 10:47
AmbiguousName25-Jul-10 10:47 
Questionfunny crash, do you know why? Pin
includeh1025-Jul-10 8:53
includeh1025-Jul-10 8:53 
AnswerRe: funny crash, do you know why? Pin
Luc Pattyn25-Jul-10 9:40
sitebuilderLuc Pattyn25-Jul-10 9:40 
AnswerRe: funny crash, do you know why? Pin
elchupathingy25-Jul-10 10:29
elchupathingy25-Jul-10 10:29 
AnswerRe: funny crash, do you know why? Pin
Sauro Viti25-Jul-10 10:42
professionalSauro Viti25-Jul-10 10:42 
AnswerRe: funny crash, do you know why? Pin
«_Superman_»25-Jul-10 18:45
professional«_Superman_»25-Jul-10 18:45 
GeneralRe: funny crash, do you know why? Pin
ThatsAlok25-Jul-10 20:09
ThatsAlok25-Jul-10 20:09 
GeneralRe: funny crash, do you know why? Pin
Aescleal25-Jul-10 21:26
Aescleal25-Jul-10 21:26 
AnswerRe: funny crash, do you know why? Pin
Alan Balkany26-Jul-10 5:13
Alan Balkany26-Jul-10 5:13 
Questionshortcut for going to function definition Pin
AmbiguousName24-Jul-10 22:49
AmbiguousName24-Jul-10 22:49 
AnswerRe: shortcut for going to function definition Pin
Richard MacCutchan25-Jul-10 1:36
mveRichard MacCutchan25-Jul-10 1:36 
GeneralRe: shortcut for going to function definition Pin
Sauro Viti25-Jul-10 4:41
professionalSauro Viti25-Jul-10 4:41 
QuestionBasic question about MFC document view architecture Pin
CString(0xcccccccc)24-Jul-10 10:25
CString(0xcccccccc)24-Jul-10 10:25 
AnswerRe: Basic question about MFC document view architecture Pin
KingsGambit24-Jul-10 19:23
KingsGambit24-Jul-10 19:23 
AnswerRe: Basic question about MFC document view architecture Pin
Richard MacCutchan24-Jul-10 21:28
mveRichard MacCutchan24-Jul-10 21:28 
AnswerRe: Basic question about MFC document view architecture Pin
Aescleal25-Jul-10 3:55
Aescleal25-Jul-10 3: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.