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

C / C++ / MFC

 
QuestionGetPixel intercept [modified] Pin
Venkat_Ivy29-Jun-06 23:16
Venkat_Ivy29-Jun-06 23:16 
Questionhow to fix the minimum size of the window? Pin
mimimimilaw29-Jun-06 23:10
mimimimilaw29-Jun-06 23:10 
AnswerRe: how to fix the minimum size of the window? Pin
ovidiucucu29-Jun-06 23:50
ovidiucucu29-Jun-06 23:50 
GeneralRe: how to fix the minimum size of the window? Pin
mimimimilaw30-Jun-06 0:03
mimimimilaw30-Jun-06 0:03 
AnswerRe: how to fix the minimum size of the window? Pin
Viorel.29-Jun-06 23:51
Viorel.29-Jun-06 23:51 
GeneralRe: how to fix the minimum size of the window? Pin
mimimimilaw30-Jun-06 0:03
mimimimilaw30-Jun-06 0:03 
QuestionError in controlling play volume Pin
programmer8129-Jun-06 22:46
programmer8129-Jun-06 22:46 
QuestionMultiple CHtmlView problem [modified] Pin
hyzerfool29-Jun-06 22:40
hyzerfool29-Jun-06 22:40 
I have an application that uses a CMyHTMLView derived from CHtmlView. The user can have multiple CHtmlViews open at the same time. Everything seems to work fine until we try to Serialize. In Serialize each CHtmlView gets the HTML from the browser to save by doing this:

MSHTML::IHTMLDocument2Ptr doc = GetHtmlDocument();
IPersistStreamInitPtr stream = doc;

CStreamOnCString sstream;
stream->Save( static_cast<istream*>(&sstream), false );

CString result;
VERIFY(sstream.CopyData( result ));

sstream.Release ();
stream.Release ();
doc.Release ();

The problem is every CHtmlView returns the same HTML as is in the most recently opened CHtmlView, even if they're in different documents. I tried using different methods to get the source (including CHtmlView::GetSource, which doesn't always give me all the HTML) but they all do the same thing.

Then it occurred to me that maybe they all have the same HTML in them, so in my app I used the context menu's view source to check and, sure enough, they all show the same code. If I go to one of the earlier opened views and Refresh, it updates to display the same thing as the most recently opened view.

The views are being controlled from VBScript using an IWebBrowser2 passed by my app, which I get by:

GetApplication ()->QueryInterface (__uuidof(IWebBrowser2),(void**) (&pNewBrowser));

and are usually displaying files from the local machine.

Views are created using CreateView from Stingray's CGXTabWnd, which seems to call CRuntimeClass::CreateObject. The CMyHTMLViewclass does IMPLEMENT_SERIAL but not DECLARE_DYNCREATE.

When, from VBScript, we call Navigate to load pages in, it does display the correct page and doesn't visually modify any other existing browser.

Any idea what I'm doing wrong?


-- modified at 4:45 Friday 30th June, 2006
QuestionRe: Multiple CHtmlView problem Pin
Viorel.29-Jun-06 23:37
Viorel.29-Jun-06 23:37 
AnswerRe: Multiple CHtmlView problem Pin
hyzerfool1-Jul-06 18:54
hyzerfool1-Jul-06 18:54 
QuestionPlay simple Avi file in WIN32 API C++ Pin
Ward29-Jun-06 22:25
Ward29-Jun-06 22:25 
AnswerRe: Play simple Avi file in WIN32 API C++ Pin
Sarath C29-Jun-06 22:29
Sarath C29-Jun-06 22:29 
GeneralRe: Play simple Avi file in WIN32 API C++ Pin
Ward29-Jun-06 23:10
Ward29-Jun-06 23:10 
GeneralRe: Play simple Avi file in WIN32 API C++ Pin
David Crow30-Jun-06 2:46
David Crow30-Jun-06 2:46 
GeneralRe: Play simple Avi file in WIN32 API C++ [modified] Pin
Ward30-Jun-06 2:55
Ward30-Jun-06 2:55 
GeneralRe: Play simple Avi file in WIN32 API C++ Pin
David Crow30-Jun-06 3:34
David Crow30-Jun-06 3:34 
GeneralRe: Play simple Avi file in WIN32 API C++ Pin
Ward2-Jul-06 20:30
Ward2-Jul-06 20:30 
AnswerRe: Play simple Avi file in WIN32 API C++ Pin
Hamid_RT29-Jun-06 23:43
Hamid_RT29-Jun-06 23:43 
GeneralRe: Play simple Avi file in WIN32 API C++ Pin
Ward29-Jun-06 23:48
Ward29-Jun-06 23:48 
GeneralRe: Play simple Avi file in WIN32 API C++ Pin
Hamid_RT29-Jun-06 23:57
Hamid_RT29-Jun-06 23:57 
QuestionSOS.@_@!!! How to open html file in win32 ?? Pin
basecolor29-Jun-06 22:19
basecolor29-Jun-06 22:19 
AnswerRe: SOS.@_@!!! How to open html file in win32 ?? Pin
basecolor29-Jun-06 23:03
basecolor29-Jun-06 23:03 
GeneralRe: SOS.@_@!!! How to open html file in win32 ?? Pin
super_ttd2-Jul-06 0:53
super_ttd2-Jul-06 0:53 
AnswerRe: SOS.@_@!!! How to open html file in win32 ?? Pin
Sarath C30-Jun-06 1:06
Sarath C30-Jun-06 1:06 
AnswerRe: SOS.@_@!!! How to open html file in win32 ?? Pin
toxcct30-Jun-06 1:54
toxcct30-Jun-06 1:54 

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.