1

Topic: Explain about template WTL "Internet Application"

Where and how there forms WebBrowser ? Everything that found in the code is a call




m_hWndClient = m_view. Create (m_hWnd, rcDefault, _T ("http://www.microsoft.com"), WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_HSCROLL | WS_VSCROLL, WS_EX_CLIENTEDGE); 

, Which finally is reduced to call CreateWindowEx ()


What, if as function window title to transfer URL a web resource CreateWindowEx automatically creates a web-kontrol, or what I not so understand? It somewhere is documented?

2

Re: Explain about template WTL "Internet Application"

Hello, the Anonymous author, you wrote:

Where and how there forms WebBrowser ? Everything that found in the code is a call

M_HWNDCLIENT = m_view. Create (m_hWnd, rcDefault, _T ("http://www.microsoft.com"), WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_HSCROLL | WS_VSCROLL, WS_EX_CLIENTEDGE); 
 

, Which finally is reduced to call CreateWindowEx ()

What, if as function window title to transfer URL a web resource CreateWindowEx automatically creates a web-kontrol, or what I not so understand? It somewhere is documented?


If in CAxWindow:: Create to transfer URI, it creates WebBrowser.





class CMainWindow: public CWindowImpl <CMainWindow, CWindow, CWinTraits <WS_OVERLAPPEDWINDOW, 0>> 
{ 
    BEGIN_MSG_MAP_EX (CMainWindow) 
        MSG_WM_CREATE (OnCreate) 
        MSG_WM_DESTROY ([AND] () {PostQuitMessage (0);}) 
    END_MSG_MAP () 

    LRESULT OnCreate (LPCREATESTRUCT) 
    { 
        CRect rc (CPoint (20, 20), CSize (500, 300)); 
        
        CAxWindow m_browserWnd; 
        m_browserWnd. Create (m_hWnd, rc, L "http://ya.ru", WS_VISIBLE | WS_CHILD); 

        return 0; 
    }
};




CreateWindowEx no such functionality certainly has. There the class of a window which actually and defines what  is necessary will be created.


Actually CAxWindow:: Create creates a window with class AtlAxWinNNN (container) which already creates a web browser (or the container, etc. creates still)

More in detail can look in spy ++

3

Re: Explain about template WTL "Internet Application"

Hello, Abyx, you wrote:

A> Hello, the Anonymous author, you wrote:

> Where and how there forms WebBrowser ? Everything that found in the code is a call

>

> m_hWndClient = m_view. Create (m_hWnd, rcDefault, _T ("http://www.microsoft.com"), WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_HSCROLL | WS_VSCROLL, WS_EX_CLIENTEDGE); 
> 

, Which finally is reduced to call CreateWindowEx ()

> What, if as function window title to transfer URL a web resource CreateWindowEx automatically creates a web-kontrol, or what I not so understand? It somewhere is documented?

A> if in CAxWindow:: Create to transfer URI, it creates WebBrowser.


Now it is clear, thanks. And there is no method to ask CAxWindow to create WebBrowser, without transferring it URI?