Click here to Skip to main content
15,900,258 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: ::CreateDC() returns NULL with errorcode ERROR_INVALID_PRINTER_NAME(1801) Pin
Eugen Podsypalnikov29-Mar-10 21:29
Eugen Podsypalnikov29-Mar-10 21:29 
GeneralRe: ::CreateDC() returns NULL with errorcode ERROR_INVALID_PRINTER_NAME(1801) Pin
hanq_3891013029-Mar-10 21:48
hanq_3891013029-Mar-10 21:48 
GeneralRe: ::CreateDC() returns NULL with errorcode ERROR_INVALID_PRINTER_NAME(1801) Pin
Eugen Podsypalnikov29-Mar-10 21:53
Eugen Podsypalnikov29-Mar-10 21:53 
GeneralRe: ::CreateDC() returns NULL with errorcode ERROR_INVALID_PRINTER_NAME(1801) Pin
hanq_3891013029-Mar-10 22:04
hanq_3891013029-Mar-10 22:04 
GeneralRe: ::CreateDC() returns NULL with errorcode ERROR_INVALID_PRINTER_NAME(1801) Pin
Eugen Podsypalnikov29-Mar-10 22:10
Eugen Podsypalnikov29-Mar-10 22:10 
GeneralRe: ::CreateDC() returns NULL with errorcode ERROR_INVALID_PRINTER_NAME(1801) Pin
hanq_3891013029-Mar-10 22:25
hanq_3891013029-Mar-10 22:25 
GeneralRe: ::CreateDC() returns NULL with errorcode ERROR_INVALID_PRINTER_NAME(1801) [modified] Pin
Eugen Podsypalnikov29-Mar-10 22:49
Eugen Podsypalnikov29-Mar-10 22:49 
GeneralRe: ::CreateDC() returns NULL with errorcode ERROR_INVALID_PRINTER_NAME(1801) Pin
hanq_3891013029-Mar-10 23:03
hanq_3891013029-Mar-10 23:03 
GeneralRe: ::CreateDC() returns NULL with errorcode ERROR_INVALID_PRINTER_NAME(1801) Pin
hanq_3891013029-Mar-10 22:30
hanq_3891013029-Mar-10 22:30 
QuestionHow to get IP addresses of all PC's connected in LAN? Pin
Nilesh Hamane29-Mar-10 19:21
Nilesh Hamane29-Mar-10 19:21 
AnswerRe: How to get IP addresses of all PC's connected in LAN? Pin
Adam Roderick J29-Mar-10 19:52
Adam Roderick J29-Mar-10 19:52 
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


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.