none
Deaktop Application Embedding OLE Browsers

    General discussion

  • The more you walk the path of your own OLE container the more you want out of there. Using ATL is much easier, so whatever I can get I must get from ATL. The other route and OLE in general is something I must avoid dealing with. The whole thing is about how to avoid dreadful expenditures of time over specific platform complexity when you need to address four platforms simultaneously. OLE seems to me like legacy view structure from the middle ages when I compare this to Apple view system.


    Sunday, May 19, 2019 5:08 PM

All replies

  • Hello,

    Thanks for posting here.

    >>IWebBrowser2 Draw Control

    Here are several links about using web browser control. Seems that the browser object's display area should be resized when a window receives a WM_SIZE message.

    Reusing the web browser control
    Embedded WebBrowser (IWebBrowser2) in Pure C++ (no MFC, etc)
    Launch and control MSIE using IWebBrowser2

    If possible, we would appreciate it if you could provide detailed steps or a simple demo for us to reproduce your issue. so that we could help you easily.

    Best Wishes,

    Jack Zhang


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, May 20, 2019 9:52 AM
    Moderator
  • Hello,

    Refer to Embedded WebBrowser (IWebBrowser2) in Pure C++ (no MFC, etc), I suggest you could try to use IOleInPlaceObject::SetObjectRects method to specifies how much of the in-place object is to be visible after you call the MoveWindow() function.

    Best Wishes,

    Jack Zhang


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, May 22, 2019 9:47 AM
    Moderator
  • Hello,

    >> Please, can you tell me what approach is better and which one to use. Your way with CoCreate or the other way with ATL window class.

    What's the type of your application? Win32? MFC? UWP?  AFAIK, in UWP, you could use WebView class, which seems similar to the WKWebView in IOS, the web view control embeds a view into your app that renders web content using the Microsoft Edge rendering engine. Hyperlinks can also appear and function in a web view control. In .NET, We could use WebBrowser class to Enables the user to navigate Web pages inside the Form. Embedded WebBrowser (IWebBrowser2) in Pure C++ (no MFC, etc) provide a self-define WebBrowser class which was a little similar to the UWP WebView class and .Net WebBrowser class. What ever my way or other way, they are just for the reference, if you want to define a class by your-self. I guess you need to learn more about COM and ATL.

    Best Wishes,

    Jack Zhang


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, May 30, 2019 8:47 AM
    Moderator