Click here to Skip to main content
15,894,343 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Permanent popup menu (aka list control) c++, MFC Pin
Sauro Viti6-Aug-10 0:27
professionalSauro Viti6-Aug-10 0:27 
GeneralRe: Permanent popup menu (aka list control) c++, MFC Pin
arthur89kim6-Aug-10 0:35
arthur89kim6-Aug-10 0:35 
AnswerRe: Permanent popup menu (aka list control) c++, MFC Pin
Richard MacCutchan5-Aug-10 23:53
mveRichard MacCutchan5-Aug-10 23:53 
GeneralRe: Permanent popup menu (aka list control) c++, MFC Pin
arthur89kim6-Aug-10 0:16
arthur89kim6-Aug-10 0:16 
GeneralRe: Permanent popup menu (aka list control) c++, MFC Pin
Richard MacCutchan6-Aug-10 0:48
mveRichard MacCutchan6-Aug-10 0:48 
GeneralRe: Permanent popup menu (aka list control) c++, MFC Pin
arthur89kim6-Aug-10 4:16
arthur89kim6-Aug-10 4:16 
GeneralRe: Permanent popup menu (aka list control) c++, MFC Pin
Richard MacCutchan6-Aug-10 4:40
mveRichard MacCutchan6-Aug-10 4:40 
GeneralRe: Permanent popup menu (aka list control) c++, MFC Pin
arthur89kim7-Aug-10 21:36
arthur89kim7-Aug-10 21:36 
GeneralRe: Permanent popup menu (aka list control) c++, MFC Pin
Richard MacCutchan8-Aug-10 0:54
mveRichard MacCutchan8-Aug-10 0:54 
GeneralRe: Permanent popup menu (aka list control) c++, MFC Pin
arthur89kim8-Aug-10 15:25
arthur89kim8-Aug-10 15:25 
Questionhow to get rid of MSB8012 warning in VS2010 Pin
Chesnokov Yuriy5-Aug-10 22:03
professionalChesnokov Yuriy5-Aug-10 22:03 
QuestionMultiple excel server problem Pin
trioum5-Aug-10 21:12
trioum5-Aug-10 21:12 
AnswerRe: Multiple excel server problem Pin
Cool_Dev5-Aug-10 22:48
Cool_Dev5-Aug-10 22:48 
GeneralRe: Multiple excel server problem Pin
trioum5-Aug-10 23:54
trioum5-Aug-10 23:54 
GeneralRe: Multiple excel server problem Pin
Cool_Dev6-Aug-10 1:08
Cool_Dev6-Aug-10 1:08 
GeneralRe: Multiple excel server problem Pin
trioum6-Aug-10 19:12
trioum6-Aug-10 19:12 
GeneralRe: Multiple excel server problem Pin
Cool_Dev8-Aug-10 0:22
Cool_Dev8-Aug-10 0:22 
Questionomp parallel for reduction (+: sum) computation discrepancies? Pin
Chesnokov Yuriy5-Aug-10 20:22
professionalChesnokov Yuriy5-Aug-10 20:22 
AnswerRe: omp parallel for reduction (+: sum) computation discrepancies? Pin
Peter_in_27805-Aug-10 21:08
professionalPeter_in_27805-Aug-10 21:08 
GeneralRe: omp parallel for reduction (+: sum) computation discrepancies? Pin
Chesnokov Yuriy5-Aug-10 21:59
professionalChesnokov Yuriy5-Aug-10 21:59 
QuestionHow to change audio output/input devices? Pin
odyaho5-Aug-10 17:29
odyaho5-Aug-10 17:29 
Dears
There are two audio output devices :
1. Bluetooth SCO Audio
2. Realtek HD Audio output

And if bluetooth headset connects to PC, the default output device is item 1.
I want to change to item 2. I have tried some methods, but it still unsuccess
I know MCI functions should done it, but I am not sure which functions should use..
Attachment is test code below:

#include <windows.h>
#pragma comment (lib, "winmm.lib")
#include <mmsystem.h>
#include <iostream>
#include <stdio.h>

int main()
{
	int AIDChoise;
	UINT nDevices = waveInGetNumDevs();	// Get No. of devices
	MCI_WAVE_SET_PARMS parms;
	DWORD rc;
	TCHAR ErrMsg[256];
	
	WAVEINCAPS inwcps;
	WAVEOUTCAPS outwcps;

	for (int k=0; k < nDevices; k++)	// Get input audio devices
	{
		waveInGetDevCaps(k,&inwcps,sizeof(inwcps));
		printf(" In devname %d : %s \n",k,inwcps.szPname);
	}
	for (k=0; k < nDevices; k++)	// Get output audio devices
	{
		waveOutGetDevCaps(k,&outwcps,sizeof(outwcps));
		printf(" Out devname %d : %s \n\n",k,outwcps.szPname);

	}
	printf("Please select output device :");
	scanf(" %d",&AIDChoise);
//	getchar();
	  
	switch(AIDChoise)
	{
	case 0:
		printf("0 ~~~~~~~~~");
		parms.wOutput = 0;
		rc = mciSendCommand(0, MCI_SET, MCI_WAVE_OUTPUT, (DWORD)&parms);
		if ( rc != 0 )
			printf("Error Msg : %s \n",mciGetErrorString(rc,ErrMsg,256));
		break;
	case 1:
		printf("1 ~~~~~~~~~");
		parms.wOutput = 1;
		rc = mciSendCommand(1, MCI_SET, MCI_WAVE_OUTPUT, (DWORD)&parms);
		if ( rc != 0 )
			printf("Error Msg : %s \n",mciGetErrorString(rc,ErrMsg,256));
		break;
	default:
		printf("2~~~~~~~~~");
		printf("Invalid command.. \n");
		break;
	}


	return 0;
}

AnswerRe: How to change audio output/input devices? Pin
odyaho6-Aug-10 0:34
odyaho6-Aug-10 0:34 
QuestionIAccessible and tools like AccExplorer / Inspect Objects Pin
Member 38216205-Aug-10 14:53
Member 38216205-Aug-10 14:53 
QuestionWin32 Scheduled jobs Pin
Jach Mullan5-Aug-10 11:52
Jach Mullan5-Aug-10 11:52 
AnswerRe: Win32 Scheduled jobs Pin
Yusuf5-Aug-10 12:15
Yusuf5-Aug-10 12:15 

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.