Click here to Skip to main content
13,762,169 members

C / C++ / MFC

 
GeneralRe: Global key press Pin
Valentinor11-Jul-18 6:09
memberValentinor11-Jul-18 6:09 
GeneralRe: Global key press Pin
Jochen Arndt11-Jul-18 7:40
mvpJochen Arndt11-Jul-18 7:40 
GeneralRe: Global key press Pin
Valentinor13-Jul-18 21:45
memberValentinor13-Jul-18 21:45 
GeneralRe: Global key press Pin
Jochen Arndt13-Jul-18 22:00
mvpJochen Arndt13-Jul-18 22:00 
GeneralRe: Global key press Pin
Valentinor14-Jul-18 11:58
memberValentinor14-Jul-18 11:58 
QuestionOnDeviceChange dbcc_name length Pin
Member 138991789-Jul-18 5:34
memberMember 138991789-Jul-18 5:34 
GeneralRe: OnDeviceChange dbcc_name length Pin
Richard MacCutchan9-Jul-18 6:26
protectorRichard MacCutchan9-Jul-18 6:26 
GeneralRe: OnDeviceChange dbcc_name length Pin
Member 138991789-Jul-18 21:37
memberMember 138991789-Jul-18 21:37 
I am using MFC & C++. This code is missing the WideCharToMultibyte conversion which didn't help one bit. I am using this document as refrence: http://www.ftdichip.com/Support/Documents/AppNotes/AN_152_Detecting_USB_%20Device_Insertion_and_Removal.pdf

BOOL CTesterDlg::OnDeviceChange(UINT nEventType, DWORD_PTR dwPtrData)
{
	BOOL bReturn = CWnd::OnDeviceChange(nEventType, dwPtrData);

	PDEV_BROADCAST_DEVICEINTERFACE b = (PDEV_BROADCAST_DEVICEINTERFACE)dwPtrData;

	if(b != NULL)
	{
		CString Msg;
		Msg.Format(L"%s",b->dbcc_name);
		MessageBox(Msg);
	}

	switch (nEventType)
	{
		case DBT_DEVICEARRIVAL:
			if(hComm==INVALID_HANDLE_VALUE) DeviceInit();
			break;
		case DBT_DEVICEREMOVECOMPLETE:
			ClosePort();
			break;
	}

	return bReturn;
}

GeneralRe: OnDeviceChange dbcc_name length Pin
Richard MacCutchan9-Jul-18 22:04
protectorRichard MacCutchan9-Jul-18 22:04 
GeneralRe: OnDeviceChange dbcc_name length Pin
Member 138991789-Jul-18 22:06
memberMember 138991789-Jul-18 22:06 
SuggestionRe: OnDeviceChange dbcc_name length Pin
David Crow9-Jul-18 17:24
memberDavid Crow9-Jul-18 17:24 
AnswerRe: OnDeviceChange dbcc_name length Pin
Jochen Arndt9-Jul-18 23:57
mvpJochen Arndt9-Jul-18 23:57 
GeneralRe: OnDeviceChange dbcc_name length Pin
Member 1389917810-Jul-18 0:26
memberMember 1389917810-Jul-18 0:26 
GeneralRe: OnDeviceChange dbcc_name length Pin
Jochen Arndt10-Jul-18 0:42
mvpJochen Arndt10-Jul-18 0:42 
GeneralRe: OnDeviceChange dbcc_name length Pin
Member 1389917810-Jul-18 0:44
memberMember 1389917810-Jul-18 0:44 
QuestionChanging Display gamma [SOLVED] Pin
Valentinor9-Jul-18 1:48
memberValentinor9-Jul-18 1:48 
AnswerRe: Changing Display gamma Pin
Jochen Arndt9-Jul-18 2:05
mvpJochen Arndt9-Jul-18 2:05 
GeneralRe: Changing Display gamma Pin
Valentinor9-Jul-18 3:42
memberValentinor9-Jul-18 3:42 
GeneralRe: Changing Display gamma Pin
Jochen Arndt9-Jul-18 3:59
mvpJochen Arndt9-Jul-18 3:59 
GeneralRe: Changing Display gamma Pin
Valentinor9-Jul-18 11:51
memberValentinor9-Jul-18 11:51 
GeneralRe: Changing Display gamma Pin
Jochen Arndt9-Jul-18 22:00
mvpJochen Arndt9-Jul-18 22:00 
GeneralRe: Changing Display gamma Pin
Valentinor9-Jul-18 23:36
memberValentinor9-Jul-18 23:36 
GeneralRe: Changing Display gamma Pin
Valentinor10-Jul-18 0:33
memberValentinor10-Jul-18 0:33 
GeneralRe: Changing Display gamma Pin
Jochen Arndt10-Jul-18 0:50
mvpJochen Arndt10-Jul-18 0:50 
GeneralRe: Changing Display gamma Pin
Valentinor10-Jul-18 2:10
memberValentinor10-Jul-18 2: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.


Advertise | Privacy | Cookies | Terms of Service
Web01-2016 | 2.8.181111.1 | Last Updated 11 Nov 2018
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid