Click here to Skip to main content
15,901,035 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to create a custom list control in MFC ? Pin
shah1864-Jan-09 18:08
shah1864-Jan-09 18:08 
AnswerRe: How to create a custom list control in MFC ? Pin
Hamid_RT4-Jan-09 18:36
Hamid_RT4-Jan-09 18:36 
AnswerRe: How to create a custom list control in MFC ? Pin
Maximilien5-Jan-09 2:55
Maximilien5-Jan-09 2:55 
Questionusing CRichEditCtrl DisplayBand() function. Pin
Prasann Mayekar4-Jan-09 17:55
Prasann Mayekar4-Jan-09 17:55 
AnswerRe: using CRichEditCtrl DisplayBand() function. Pin
Hamid_RT4-Jan-09 18:39
Hamid_RT4-Jan-09 18:39 
QuestionRemoving else in this statements How? Pin
monsieur_jj4-Jan-09 15:14
monsieur_jj4-Jan-09 15:14 
AnswerRe: Removing else in this statements How? Pin
David Crow4-Jan-09 15:59
David Crow4-Jan-09 15:59 
QuestionMS‘s BUG? why can't get value from excel? Pin
ZhiLiangLin4-Jan-09 14:51
ZhiLiangLin4-Jan-09 14:51 
i want to get value from excel,for example:
COLUMN1 COLUMN2
----------------
123 456
ABC DEF
123 ABC
EFG HIJ

like this,i can't get '123' ,but i can get 'ABC'.
my code :
void ReadTrustListFromExcel(CString sFile)
{
CDatabase database;
CString sSql;
CString sItem1, sItem2;
CString sDriver;
CString sDsn;

sDriver = GetExcelDriver();//GetExcelDriver();
if (sDriver.IsEmpty())
{
return;
}

sDsn.Format(_T("ODBC;DRIVER={%s};DSN='';DBQ=%s"), sDriver, sFile);
TRY
{
database.Open(NULL, false, false, sDsn);
CRecordset recset(&database);

sSql.Format(_T("SELECT * FROM [%s$A1:IV65535]"),_T("EmailSheet"));

recset.Open(CRecordset::forwardOnly, sSql, CRecordset::readOnly);

while (!recset.IsEOF())
{
recset.GetFieldValue(short(0), sItem1);
recset.GetFieldValue(short(1), sItem2);
TRACE(_T("name:%s,addr:%s\r\n"),sItem1,sItem2);
recset.MoveNext();
}
database.Close();
}
CATCH(CDBException, e)
{
TRACE(_T("ERROR"));
}
END_CATCH;
QuestionRe: MS‘s BUG? why can't get value from excel? Pin
David Crow4-Jan-09 16:06
David Crow4-Jan-09 16:06 
AnswerRe: MS‘s BUG? why can't get value from excel? Pin
ZhiLiangLin4-Jan-09 18:21
ZhiLiangLin4-Jan-09 18:21 
QuestionRe: MS‘s BUG? why can't get value from excel? Pin
David Crow5-Jan-09 3:56
David Crow5-Jan-09 3:56 
QuestionJust-In-Time Debugger Pin
Larry Mills Sr4-Jan-09 14:51
Larry Mills Sr4-Jan-09 14:51 
AnswerRe: Just-In-Time Debugger Pin
ThatsAlok5-Jan-09 0:24
ThatsAlok5-Jan-09 0:24 
QuestionAdobe GIL - any experience to share? Pin
islobodan4-Jan-09 13:05
islobodan4-Jan-09 13:05 
QuestionHow to make the cursor move to the next ctrol of EDIT automatic? Pin
titan_sky_king4-Jan-09 12:55
titan_sky_king4-Jan-09 12:55 
AnswerRe: How to make the cursor move to the next ctrol of EDIT automatic? Pin
Richard Andrew x644-Jan-09 14:08
professionalRichard Andrew x644-Jan-09 14:08 
JokeRe: How to make the cursor move to the next ctrol of EDIT automatic? Pin
titan_sky_king5-Jan-09 17:45
titan_sky_king5-Jan-09 17:45 
AnswerRe: How to make the cursor move to the next ctrol of EDIT automatic? Pin
Mark Salsbery4-Jan-09 15:17
Mark Salsbery4-Jan-09 15:17 
JokeRe: How to make the cursor move to the next ctrol of EDIT automatic? Pin
titan_sky_king5-Jan-09 17:46
titan_sky_king5-Jan-09 17:46 
QuestionMenus Pin
BobInNJ4-Jan-09 5:59
BobInNJ4-Jan-09 5:59 
AnswerRe: Menus Pin
Mark Salsbery4-Jan-09 6:38
Mark Salsbery4-Jan-09 6:38 
GeneralRe: Menus Pin
BobInNJ4-Jan-09 11:38
BobInNJ4-Jan-09 11:38 
GeneralRe: Menus Pin
Richard Andrew x644-Jan-09 12:17
professionalRichard Andrew x644-Jan-09 12:17 
GeneralRe: Menus Pin
Mark Salsbery4-Jan-09 15:10
Mark Salsbery4-Jan-09 15:10 
GeneralRe: Menus Pin
BobInNJ5-Jan-09 12:08
BobInNJ5-Jan-09 12:08 

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.