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

C / C++ / MFC

 
GeneralHelp Pin
Goh Hui Beng22-Feb-04 14:00
Goh Hui Beng22-Feb-04 14:00 
GeneralRe: Help Pin
Ravi Bhavnani22-Feb-04 14:37
professionalRavi Bhavnani22-Feb-04 14:37 
GeneralRe: Help Pin
Goh Hui Beng22-Feb-04 15:52
Goh Hui Beng22-Feb-04 15:52 
GeneralRe: Help Pin
Steve S22-Feb-04 22:25
Steve S22-Feb-04 22:25 
GeneralDocument/View Architecture - having 1doc and 2 Views Pin
Ehsan Baghaki22-Feb-04 13:42
Ehsan Baghaki22-Feb-04 13:42 
GeneralRe: Document/View Architecture - having 1doc and 2 Views Pin
Ehsan Baghaki22-Feb-04 22:18
Ehsan Baghaki22-Feb-04 22:18 
GeneralParallel port & EPP Pin
jane69smith22-Feb-04 11:14
jane69smith22-Feb-04 11:14 
QuestionHow to determine whether master volume is enabled? Pin
Artem Moroz22-Feb-04 10:48
Artem Moroz22-Feb-04 10:48 
I'm using class CVolumeOutMaster - it sets and gets master volume. The class could be found here: http://www.codeproject.com/audio/volumeclasses.asp

It determines the volume like this:
DWORD CVolumeOutMaster::GetCurrentVolume()
{
	if ( !m_bAvailable )
		return BAD_DWORD;
	MIXERCONTROLDETAILS_UNSIGNED* aDetails =  (MIXERCONTROLDETAILS_UNSIGNED*)malloc(m_nChannelCount*sizeof(MIXERCONTROLDETAILS_UNSIGNED));
	if ( !aDetails )
		return BAD_DWORD;
	MIXERCONTROLDETAILS ControlDetails;
	memset( &ControlDetails, 0, sizeof(MIXERCONTROLDETAILS) );
	ControlDetails.cbStruct = sizeof(MIXERCONTROLDETAILS);
	ControlDetails.dwControlID = m_dwVolumeControlID;
	ControlDetails.cChannels = m_nChannelCount;
	ControlDetails.cMultipleItems = 0;
	ControlDetails.cbDetails = sizeof(MIXERCONTROLDETAILS_UNSIGNED);
	ControlDetails.paDetails = &aDetails[0];
	MMRESULT mmResult = mixerGetControlDetails( (HMIXEROBJ)m_dwMixerHandle, &ControlDetails, MIXER_GETCONTROLDETAILSF_VALUE );
	DWORD dw = aDetails[0].dwValue;
	free( aDetails );
	if ( mmResult != MMSYSERR_NOERROR )
	{
		TRACE(".MasterOutputVolume: FAILURE: Could not get volume. mmResult=%d\n", mmResult );
		return BAD_DWORD;
	}
	return dw;
}

How to determine whether master volume is enabled or disabled?
GeneralDestructing an exception Pin
Ravi Bhavnani22-Feb-04 9:57
professionalRavi Bhavnani22-Feb-04 9:57 
GeneralRe: Destructing an exception Pin
Artem Moroz22-Feb-04 10:51
Artem Moroz22-Feb-04 10:51 
GeneralRe: Destructing an exception Pin
Ravi Bhavnani22-Feb-04 10:56
professionalRavi Bhavnani22-Feb-04 10:56 
Generaldisplaying in string in hex Pin
lyn22-Feb-04 7:35
lyn22-Feb-04 7:35 
GeneralRe: displaying in string in hex Pin
Ehsan Baghaki22-Feb-04 13:53
Ehsan Baghaki22-Feb-04 13:53 
GeneralBitmap Operate On Window 98 Pin
Best Friend22-Feb-04 6:11
Best Friend22-Feb-04 6:11 
GeneralRe: Bitmap Operate On Window 98 Pin
Ryan Binns22-Feb-04 17:32
Ryan Binns22-Feb-04 17:32 
GeneralRe: Bitmap Operate On Window 98 Pin
Best Friend22-Feb-04 18:40
Best Friend22-Feb-04 18:40 
GeneralRe: Bitmap Operate On Window 98 Pin
sps-itsec4622-Feb-04 23:18
sps-itsec4622-Feb-04 23:18 
GeneralRe: Bitmap Operate On Window 98 Pin
Best Friend23-Feb-04 3:15
Best Friend23-Feb-04 3:15 
GeneralRe: Bitmap Operate On Window 98 Pin
sps-itsec4623-Feb-04 7:22
sps-itsec4623-Feb-04 7:22 
Generalthe windows interface Pin
Anonymous22-Feb-04 3:56
Anonymous22-Feb-04 3:56 
GeneralRe: the windows interface Pin
Irish_GUI22-Feb-04 6:10
Irish_GUI22-Feb-04 6:10 
GeneralMicrosoft Chart in Visual c++ Pin
krugger22-Feb-04 3:55
krugger22-Feb-04 3:55 
GeneralRe: Microsoft Chart in Visual c++ Pin
Ravi Bhavnani22-Feb-04 14:38
professionalRavi Bhavnani22-Feb-04 14:38 
Generaldialog parent window pointer Pin
Irish_GUI22-Feb-04 3:10
Irish_GUI22-Feb-04 3:10 
GeneralRe: dialog parent window pointer Pin
J.B.22-Feb-04 3:42
J.B.22-Feb-04 3:42 

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.