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

C / C++ / MFC

 
GeneralRe: Stuck with function pointers in C and C++ Pin
Stefan_Lang29-Jan-13 0:02
Stefan_Lang29-Jan-13 0:02 
GeneralRe: Stuck with function pointers in C and C++ Pin
Simon Langdon29-Jan-13 0:38
Simon Langdon29-Jan-13 0:38 
GeneralRe: Stuck with function pointers in C and C++ Pin
Stefan_Lang29-Jan-13 4:31
Stefan_Lang29-Jan-13 4:31 
GeneralRe: Stuck with function pointers in C and C++ Pin
CPallini25-Jan-13 2:04
mveCPallini25-Jan-13 2:04 
GeneralRe: Stuck with function pointers in C and C++ Pin
Freak3027-Jan-13 23:30
Freak3027-Jan-13 23:30 
AnswerRe: Stuck with function pointers in C and C++ Pin
Stephen Hewitt27-Jan-13 4:40
Stephen Hewitt27-Jan-13 4:40 
QuestionUSB Device Path Handle Problem Pin
002comp24-Jan-13 21:21
002comp24-Jan-13 21:21 
AnswerRe: USB Device Path Handle Problem Pin
Vaclav_28-Jan-13 10:08
Vaclav_28-Jan-13 10:08 
Take a look at this snippet, it may give you an idea.
This is "under construction" code , not plug and pray!
I use it with strDevice = "USB".
There is a SetupDi API for getting "friendly name", somewhere in my messy code.


DWORD dwFlag = DIGCF_ALLCLASSES | DIGCF_PRESENT;
TRACE("\nSetupDiGetClassDevs %s ", strDevice);

HDEVINFO hDevInfo = SetupDiGetClassDevs(NULL,strDevice, NULL,dwFlag);

if( INVALID_HANDLE_VALUE == hDevInfo ) {
TRACE("\nINVALID_HANDLE_VALUE == hDevInfo ");
return false;
}
TRACE("\nFind all selected devices %s",strDevice);
SP_DEVINFO_DATA* pspDevInfoData =
(SP_DEVINFO_DATA*)HeapAlloc(GetProcessHeap(), 0, sizeof(SP_DEVINFO_DATA));
pspDevInfoData->cbSize = sizeof(SP_DEVINFO_DATA);

int i = 0;
DWORD DataT ;
DWORD nSize=0 ;
TCHAR buf[MAX_PATH];
while (SetupDiEnumDeviceInfo(hDevInfo,i,pspDevInfoData))
{
SetupDiGetDeviceInstanceId(hDevInfo, pspDevInfoData, buf, sizeof(buf), &nSize);
{
TRACE("\nFind LittelWire ");
CString strTest = buf;
// CString strResult = strTest.SpanIncluding("0C9F");
int iFoundIndex = strTest.Find(strDeviceID);
TRACE("\nCount %i Buffer %s",i, buf);
if(iFoundIndex > 0 )
{
TRACE("\nCount %i Buffer %s Device %s found", i, buf, strDeviceID);
return true;
}
}
i++;
}
TRACE("\nDevice %s not found", strDeviceID);
return false;
QuestionHow to create a button on the right of the screen in mfc.? Pin
mbatra3124-Jan-13 19:53
mbatra3124-Jan-13 19:53 
AnswerRe: How to create a button on the right of the screen in mfc.? Pin
Richard MacCutchan24-Jan-13 22:47
mveRichard MacCutchan24-Jan-13 22:47 
GeneralRe: How to create a button on the right of the screen in mfc.? Pin
mbatra3127-Jan-13 19:39
mbatra3127-Jan-13 19:39 
GeneralRe: How to create a button on the right of the screen in mfc.? Pin
Richard MacCutchan27-Jan-13 22:36
mveRichard MacCutchan27-Jan-13 22:36 
GeneralRe: How to create a button on the right of the screen in mfc.? Pin
mbatra3128-Jan-13 0:07
mbatra3128-Jan-13 0:07 
AnswerRe: How to create a button on the right of the screen in mfc.? Pin
Iain Clarke, Warrior Programmer24-Jan-13 23:13
Iain Clarke, Warrior Programmer24-Jan-13 23:13 
GeneralRe: How to create a button on the right of the screen in mfc.? Pin
mbatra3127-Jan-13 20:11
mbatra3127-Jan-13 20:11 
AnswerRe: How to create a button on the right of the screen in mfc.? Pin
Albert Holguin25-Jan-13 7:47
professionalAlbert Holguin25-Jan-13 7:47 
QuestionCall CListCtrl::GetItemCount() in work thread proble. Pin
yu-jian24-Jan-13 17:41
yu-jian24-Jan-13 17:41 
AnswerRe: Call CListCtrl::GetItemCount() in work thread proble. Pin
«_Superman_»24-Jan-13 18:03
professional«_Superman_»24-Jan-13 18:03 
AnswerRe: Call CListCtrl::GetItemCount() in work thread proble. Pin
Jochen Arndt24-Jan-13 21:00
professionalJochen Arndt24-Jan-13 21:00 
GeneralRe: Call CListCtrl::GetItemCount() in work thread proble. Pin
yu-jian24-Jan-13 21:48
yu-jian24-Jan-13 21:48 
GeneralRe: Call CListCtrl::GetItemCount() in work thread proble. Pin
Jochen Arndt24-Jan-13 22:18
professionalJochen Arndt24-Jan-13 22:18 
GeneralRe: Call CListCtrl::GetItemCount() in work thread proble. Pin
yu-jian24-Jan-13 23:40
yu-jian24-Jan-13 23:40 
QuestionOpen cv C++ Pin
Member 961996424-Jan-13 7:15
Member 961996424-Jan-13 7:15 
AnswerRe: Open cv C++ Pin
Jibesh24-Jan-13 7:44
professionalJibesh24-Jan-13 7:44 
Questionhow to compress data using zlib? Pin
IICTECH24-Jan-13 1:04
IICTECH24-Jan-13 1:04 

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.