Click here to Skip to main content
15,881,027 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: UI Programming start Pin
_AnsHUMAN_ 27-Feb-06 16:45
_AnsHUMAN_ 27-Feb-06 16:45 
GeneralRe: UI Programming start Pin
Chintoo72327-Feb-06 17:31
Chintoo72327-Feb-06 17:31 
GeneralRe: UI Programming start Pin
_AnsHUMAN_ 27-Feb-06 18:10
_AnsHUMAN_ 27-Feb-06 18:10 
QuestionHow to Compute the ID of "eject" menuitem? Pin
Syouki_kou27-Feb-06 14:07
Syouki_kou27-Feb-06 14:07 
AnswerRe: How to Compute the ID of "eject" menuitem? Pin
mbue27-Feb-06 15:47
mbue27-Feb-06 15:47 
GeneralRe: How to Compute the ID of "eject" menuitem? Pin
Syouki_kou27-Feb-06 16:42
Syouki_kou27-Feb-06 16:42 
GeneralRe: How to Compute the ID of "eject" menuitem? Pin
Nibu babu thomas27-Feb-06 17:15
Nibu babu thomas27-Feb-06 17:15 
GeneralRe: How to Compute the ID of "eject" menuitem? Pin
mbue27-Feb-06 21:19
mbue27-Feb-06 21:19 
It seems to be impossible. How I told you before: every application can use its own ID for the eject command. The usage of a command is hard encoded in its program-code. Therefore its no way to find out which command executes the eject function.
The other post told you about the WM_DEVICECHANGE message - but this is only a notification message broadcasting to all toplevel windows. This message informs all windows that a device has been changed (see Windows-SDK for help).
I've just tested the WM_DEVICECHANGE: the message is called after the media has been removed.

#include <DBT.H><br />
void		CFrame::WmDeviceChange(WPARAM w,LPARAM l)<br />
{<br />
	switch(w)<br />
	{<br />
		case DBT_CONFIGCHANGECANCELED:<br />
		break;<br />
		case DBT_CONFIGCHANGED:<br />
		break;<br />
		case DBT_DEVICEARRIVAL:<br />
		break;<br />
		case DBT_DEVICEQUERYREMOVE:<br />
		break;<br />
		case DBT_DEVICEQUERYREMOVEFAILED:<br />
		break;<br />
		case DBT_DEVICEREMOVECOMPLETE:<br />
			// here is the debug trap after the media has been removed<br />
			// no other event came up before or after eject the media<br />
		break;<br />
		case DBT_DEVICEREMOVEPENDING:<br />
		break;<br />
		case DBT_DEVICETYPESPECIFIC:<br />
		break;<br />
		case DBT_USERDEFINED:<br />
		break;<br />
		default:<br />
			TRACE("WmDeviceChange: 0x%04X\r\n",w);<br />
		break;<br />
	}<br />
}

GeneralRe: How to Compute the ID of "eject" menuitem? Pin
Syouki_kou27-Feb-06 22:02
Syouki_kou27-Feb-06 22:02 
GeneralRe: How to Compute the ID of "eject" menuitem? Pin
mbue27-Feb-06 22:49
mbue27-Feb-06 22:49 
QuestionInstalling virtual hardware with installer Pin
rarefluid27-Feb-06 13:44
rarefluid27-Feb-06 13:44 
QuestionLink Error LNK1209 Pin
dahill27-Feb-06 13:16
dahill27-Feb-06 13:16 
AnswerRe: Link Error LNK1209 Pin
PJ Arends27-Feb-06 15:24
professionalPJ Arends27-Feb-06 15:24 
AnswerRe: Link Error LNK1209 Pin
mbue27-Feb-06 15:54
mbue27-Feb-06 15:54 
AnswerRe: Link Error LNK1209 Pin
Vinaya27-Feb-06 18:20
Vinaya27-Feb-06 18:20 
QuestionRe: Link Error LNK1209 Pin
dahill28-Feb-06 8:21
dahill28-Feb-06 8:21 
NewsRe: Link Error LNK1209 Pin
dahill28-Feb-06 11:36
dahill28-Feb-06 11:36 
AnswerRe: Link Error LNK1209 Pin
dahill1-Mar-06 7:57
dahill1-Mar-06 7:57 
QuestionBitmap in a dialog Pin
69 Bay27-Feb-06 12:35
69 Bay27-Feb-06 12:35 
AnswerRe: Bitmap in a dialog Pin
Christian Graus27-Feb-06 14:19
protectorChristian Graus27-Feb-06 14:19 
GeneralRe: Bitmap in a dialog Pin
69 Bay28-Feb-06 0:04
69 Bay28-Feb-06 0:04 
GeneralRe: Bitmap in a dialog Pin
Christian Graus28-Feb-06 10:54
protectorChristian Graus28-Feb-06 10:54 
GeneralRe: Bitmap in a dialog Pin
69 Bay1-Mar-06 8:11
69 Bay1-Mar-06 8:11 
AnswerRe: Bitmap in a dialog Pin
Hamid_RT27-Feb-06 17:32
Hamid_RT27-Feb-06 17:32 
QuestionFrameless MDI Child Pin
garaber27-Feb-06 10:10
garaber27-Feb-06 10:10 

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.