Excel Automation with MFC

D

Duc Le

Hi,

I'm using COleDocObjectItem and following the
example MSDN has for embedding Excel with MFC.
Using the APP Wizard to create a MDI app
that supports Container and Active Container Document.

With that, I am able to more than 2 child windows
that embed an excel workbook.

After changing their code from in CExcelmdiView
and moving the OnInsertObject to OnInitialUpdate
and making the method have:

CSettlementsDoc * pDoc = GetDocument();
ASSERT_VALID(pDoc);

pItem = new CEmdatCntrItem(pDoc);
pItem->CreateFromFile("h:\\emdat.xlt");
// deal with Display As Iconic option
pItem->DoVerb(OLEIVERB_SHOW, this);

With this, when I include multiple child windows,
the app has trouble painting the child windows...
Has anyone see this behavior and have any clues
on how to fix it?

Thanks.

Duc Le
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top