Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I need some little advice, please!

Status
Not open for further replies.

Robertus

Programmer
Feb 16, 2001
81
RO
Hi, there!

Please, could you give me some good advice?

I need to build a presentation catalogue in MFC and I need to know wich method to use? I need my app to show me a big number of slides (43), each slide to present a certain section of my firm. I use the WebBrowser ActiveX Ctrl and the slides are HTMLs.
Is there some other way that I should do that? Should I create 43 wnd classes (a wnd class per slide) and use them in my app? Tell me, please how would you do that catalogue? (in MFC - the only way I know)

I know that there are many programs that can build the catalogue for me but I want to build my own application that does it.

Please, give me a suggestion, some little help.

Thanks a lot, weather you answer me or not!

Robert.
 


It's ok to do it like this. Place a 'Next' and a 'Prev' button in your window.
In the button handler, call the function Navigate of the browser. The first parameter is the path for your HTML files.

COleSafeArray vPostData;
COleVariant vHeaders("", VT_BSTR);
COleVariant vTargetFrameName("", VT_BSTR);
COleVariant vFlags((long) 0, VT_I4);

// Display HTML File

m_WebBrowser.Navigate( strFileName, vFlags, vTargetFrameName, vPostData, vHeaders);

You can wait for the complete load of the web page using the following code:

// Wait for Complete Download

while( m_WebBrowser.GetReadyState() != READYSTATE_COMPLETE)
PeekAndPump();


The function PeekandPump() is like this:

BOOL C...::peekAndPump()
{
static MSG msg;

while ( ::peekMessage( &msg,NULL,0,0,PM_NOREMOVE))
{
if ( !AfxGetApp()->PumpMessage())
{
::postQuitMessage( 0);

return FALSE;
}
}

return TRUE;
}


Hope it helps

Thierry
Thierry.Marneffe@swing.be
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top