Click here to Skip to main content
15,896,912 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to get IP addresses of all PC's connected in LAN? Pin
David Crow30-Mar-10 2:51
David Crow30-Mar-10 2:51 
Questioncan not use VK_BACK as i wish Pin
dung nam29-Mar-10 17:02
dung nam29-Mar-10 17:02 
QuestionRe: can not use VK_BACK as i wish Pin
KingsGambit29-Mar-10 18:17
KingsGambit29-Mar-10 18:17 
AnswerRe: can not use VK_BACK as i wish Pin
Adam Roderick J29-Mar-10 18:42
Adam Roderick J29-Mar-10 18:42 
AnswerRe: can not use VK_BACK as i wish Pin
Adam Roderick J29-Mar-10 18:29
Adam Roderick J29-Mar-10 18:29 
AnswerRe: can not use VK_BACK as i wish Pin
Rajesh R Subramanian29-Mar-10 22:07
professionalRajesh R Subramanian29-Mar-10 22:07 
Questionaccess excel using c++ Pin
browneyes8629-Mar-10 10:25
browneyes8629-Mar-10 10:25 
AnswerRe: access excel using c++ Pin
Adam Roderick J29-Mar-10 19:22
Adam Roderick J29-Mar-10 19:22 
GeneralRe: access excel using c++ Pin
browneyes8631-Mar-10 3:29
browneyes8631-Mar-10 3:29 
AnswerRe: access excel using c++ Pin
Cool_Dev29-Mar-10 20:14
Cool_Dev29-Mar-10 20:14 
GeneralRe: access excel using c++ Pin
browneyes8631-Mar-10 3:32
browneyes8631-Mar-10 3:32 
GeneralRe: access excel using c++ Pin
Cool_Dev31-Mar-10 4:00
Cool_Dev31-Mar-10 4:00 
GeneralRe: access excel using c++ Pin
browneyes8631-Mar-10 4:30
browneyes8631-Mar-10 4:30 
AnswerRe: access excel using c++ Pin
David Crow30-Mar-10 3:39
David Crow30-Mar-10 3:39 
buki86 wrote:
_variant_t raw_data[10];


Shouldn't this be 11?

buki86 wrote:
_variant_t vItem = pRange->Item[(long) 1][(long) iColumn ];


Since the range is only one cell, both the row and column will be 1.

buki86 wrote:
pRange = pSheet->GetRange( _bstr_t("B2"), _bstr_t("B12") );

for ( int iRow = 1;iRow < 10; ++iRow )


The range you are defining has 11 rows. The loop will run 9 times. Is that intentional?

Try something like:
for (int iRow = 0; iRow < 11; ++iRow)
{
    _variant_t vItem = pRange.GetItem(COleVariant(iRow + 1L), COleVariant(1L));
    _bstr_t bstrText(vItem);
    raw_data[iRow] = vItem;
    cout << (long) raw_data[iRow];
} 

"One man's wage rise is another man's price increase." - Harold Wilson

"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

"Man who follows car will be exhausted." - Confucius


GeneralRe: access excel using c++ Pin
browneyes8631-Mar-10 3:36
browneyes8631-Mar-10 3:36 
AnswerRe: access excel using c++ Pin
David Crow31-Mar-10 4:44
David Crow31-Mar-10 4:44 
QuestionHow to detect if CEdti lost focus by mouse, keyboard or another event Pin
manchukuo29-Mar-10 9:25
manchukuo29-Mar-10 9:25 
AnswerRe: How to detect if CEdti lost focus by mouse, keyboard or another event Pin
Chris Losinger29-Mar-10 9:35
professionalChris Losinger29-Mar-10 9:35 
AnswerRe: How to detect if CEdti lost focus by mouse, keyboard or another event Pin
Eugen Podsypalnikov29-Mar-10 9:44
Eugen Podsypalnikov29-Mar-10 9:44 
AnswerRe: How to detect if CEdti lost focus by mouse, keyboard or another event Pin
manchukuo29-Mar-10 11:28
manchukuo29-Mar-10 11:28 
Question#pragma optimize("",on) #pragma optimize("",off) Pin
ForNow29-Mar-10 6:59
ForNow29-Mar-10 6:59 
AnswerRe: #pragma optimize("",on) #pragma optimize("",off) Pin
Randor 29-Mar-10 7:41
professional Randor 29-Mar-10 7:41 
AnswerRe: #pragma optimize("",on) #pragma optimize("",off) Pin
Stuart Dootson29-Mar-10 7:42
professionalStuart Dootson29-Mar-10 7:42 
GeneralRe: #pragma optimize("",on) #pragma optimize("",off) Pin
ForNow29-Mar-10 9:02
ForNow29-Mar-10 9:02 
QuestionRe: #pragma optimize("",on) #pragma optimize("",off) Pin
David Crow30-Mar-10 4:00
David Crow30-Mar-10 4:00 

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.