Click here to Skip to main content
15,916,835 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: add code of file *.cpp and *.h into MFC Pin
David Crow9-Apr-05 12:19
David Crow9-Apr-05 12:19 
GeneralAdjusting Media Volume Pin
barnje079-Apr-05 6:19
barnje079-Apr-05 6:19 
GeneralRe: Adjusting Media Volume Pin
David Crow9-Apr-05 12:20
David Crow9-Apr-05 12:20 
GeneralRe: Adjusting Media Volume Pin
barnje0711-Apr-05 3:01
barnje0711-Apr-05 3:01 
GeneralRe: Adjusting Media Volume Pin
David Crow11-Apr-05 3:10
David Crow11-Apr-05 3:10 
Generallinking error Pin
Member 16179999-Apr-05 5:46
Member 16179999-Apr-05 5:46 
GeneralAbout the ComboBox problem! Pin
zhenyuanwu9-Apr-05 4:48
zhenyuanwu9-Apr-05 4:48 
GeneralAbout the ComboBox problem! Pin
zhenyuanwu9-Apr-05 4:48
zhenyuanwu9-Apr-05 4:48 
BOOL CFx2Dialog::OnInitDialog()
{
CDialog::OnInitDialog();
int devices = USBDevice->DeviceCount();
CCyUSBEndPoint* endpt;
int d = 0;
do {
USBDevice->Open(d);
d++;
} while ((d < devices ) && (USBDevice->VendorID != 0x8888) && (USBDevice->ProductID != 0x8888));
if((USBDevice->VendorID == 0x8888) && (USBDevice->ProductID = 0x8888))
{
epts = USBDevice->EndPointCount();
// Load the endpoint combo boxes
for (int i=1; i<epts; i++)="" {="" skip="" endpoint="" 0,="" which="" we="" know="" is="" the="" control="" endpoint
="" endpt="USBDevice-">EndPoints[i];
if (endpt->Attributes == 2)
{
if(endpt->Address & 0x80) // Bulk
sprintf(s, "EndPoint IN 0x%02X", endpt->Address);
else
sprintf(s, "EndPoint OUT 0x%02X", endpt->Address);
m_ComBox1.AddString(s);
sprintf(s, "%d", endpt);
AfxMessageBox(s);
m_ComBox1.SetItemDataPtr(m_ComBox1.GetCount()-1,endpt);
}
}
}
endpt=(CCyUSBEndPoint*)m_ComBox1.GetItemDataPtr(0);
sprintf(s,"%d",endpt);
AfxMessageBox(s);
return TRUE;
}
from the last AfxMessageBox(s) function I get the result of "0",But from the earlier AfxMessageBox(s) function I can get the value of endpt.Why can not I get the endpt's value? If I set endpt=(CCyUSBEndPoint*)m_ComBox1.GetItemDataPtr(0); I can get the value of endpt as before? Is there any error with SetItemDataPtr(**) or GetItemDataPtr(*)?
GeneralRe: About the ComboBox problem! Pin
yeghia9-Apr-05 6:53
professionalyeghia9-Apr-05 6:53 
GeneralWeb service Pin
Imtiaz Murtaza9-Apr-05 3:40
Imtiaz Murtaza9-Apr-05 3:40 
GeneralRe: Web service Pin
Ravi Bhavnani9-Apr-05 5:59
professionalRavi Bhavnani9-Apr-05 5:59 
Questionhow to call a function outside class?? Pin
unidentify9-Apr-05 0:35
unidentify9-Apr-05 0:35 
AnswerRe: how to call a function outside class?? Pin
deldeep9-Apr-05 2:49
deldeep9-Apr-05 2:49 
GeneralRe: how to call a function outside class?? Pin
unidentify9-Apr-05 21:24
unidentify9-Apr-05 21:24 
GeneralParsing command line info in MDI Pin
ledallam8-Apr-05 23:40
ledallam8-Apr-05 23:40 
GeneralRe: Parsing command line info in MDI Pin
ThatsAlok9-Apr-05 0:02
ThatsAlok9-Apr-05 0:02 
GeneralRe: Parsing command line info in MDI Pin
ledallam9-Apr-05 2:11
ledallam9-Apr-05 2:11 
GeneralRe: Parsing command line info in MDI Pin
ThatsAlok9-Apr-05 2:38
ThatsAlok9-Apr-05 2:38 
GeneralRe: Parsing command line info in MDI Pin
Chris Losinger9-Apr-05 4:24
professionalChris Losinger9-Apr-05 4:24 
Generalconnecting to a remote mysql database from an mfc application Pin
_kane_8-Apr-05 21:53
_kane_8-Apr-05 21:53 
GeneralRe: connecting to a remote mysql database from an mfc application Pin
Tareq Ahmed Siraj9-Apr-05 0:41
Tareq Ahmed Siraj9-Apr-05 0:41 
GeneralRe: connecting to a remote mysql database from an mfc application Pin
_kane_9-Apr-05 4:07
_kane_9-Apr-05 4:07 
QuestionHow to keep indentation when posting code? Pin
johtib8-Apr-05 20:53
johtib8-Apr-05 20:53 
AnswerRe: How to keep indentation when posting code? Pin
Roland Pibinger9-Apr-05 6:24
Roland Pibinger9-Apr-05 6:24 
GeneralRe: How to keep indentation when posting code? Pin
johtib9-Apr-05 6:30
johtib9-Apr-05 6:30 

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.