#include <webchild.h>
Public Types | |
typedef BASE | super |
Public Member Functions | |
IPCtrlWindow (HWND hwnd) | |
template<typename T> | |
IPCtrlWindow (HWND hwnd, T &info) | |
HRESULT | create_control (HWND hwnd, REFIID clsid, REFIID riid) |
Protected Member Functions | |
LRESULT | WndProc (UINT nmsg, WPARAM wparam, LPARAM lparam) |
Protected Attributes | |
ComInit | _usingCOM |
SMARTPTR | _control |
OleInPlaceClient | _client_side |
SIfacePtr< IOleInPlaceObject > | _in_place_object |
Definition at line 405 of file webchild.h.
typedef BASE IPCtrlWindow< BASE, SMARTPTR >::super |
IPCtrlWindow< BASE, SMARTPTR >::IPCtrlWindow | ( | HWND | hwnd | ) | [inline] |
IPCtrlWindow< BASE, SMARTPTR >::IPCtrlWindow | ( | HWND | hwnd, | |
T & | info | |||
) | [inline] |
HRESULT IPCtrlWindow< BASE, SMARTPTR >::create_control | ( | HWND | hwnd, | |
REFIID | clsid, | |||
REFIID | riid | |||
) | [inline] |
Definition at line 419 of file webchild.h.
00420 { 00421 // Erzeugen einer Instanz des Controls 00422 HRESULT hr = _control.CreateInstance(clsid, riid); 00423 if (FAILED(hr)) 00424 return hr; 00425 00426 _client_side.attach(hwnd); 00427 00428 hr = _client_side.attach_control(SIfacePtr<IOleObject>(_control, IID_IOleObject)/*, OLEIVERB_INPLACEACTIVATE, 00429 hwnd, &Rect(10, 10, 500, 500)*/); 00430 if (FAILED(hr)) 00431 return hr; 00432 00433 // try to get a IOleInPlaceObject interface for window resizing 00434 return _control.QueryInterface(IID_IOleInPlaceObject, &_in_place_object); // _in_place_object = _control 00435 }
LRESULT IPCtrlWindow< BASE, SMARTPTR >::WndProc | ( | UINT | nmsg, | |
WPARAM | wparam, | |||
LPARAM | lparam | |||
) | [inline, protected] |
Reimplemented in WebChildWindow.
Definition at line 438 of file webchild.h.
00439 { 00440 if (nmsg == WM_SIZE) { 00441 if (_in_place_object) { 00442 RECT rect = {0, 0, LOWORD(lparam), HIWORD(lparam)}; 00443 00444 _in_place_object->SetObjectRects(&rect, &rect); 00445 } 00446 } else if (nmsg == WM_CLOSE) { 00447 _in_place_object = NULL; 00448 00449 if (_control) { 00450 _client_side.detach(SIfacePtr<IOleObject>(_control, IID_IOleObject), OLECLOSE_NOSAVE); 00451 _control = NULL; 00452 } 00453 } 00454 00455 return super::WndProc(nmsg, wparam, lparam); 00456 }
ComInit IPCtrlWindow< BASE, SMARTPTR >::_usingCOM [protected] |
Definition at line 458 of file webchild.h.
SMARTPTR IPCtrlWindow< BASE, SMARTPTR >::_control [protected] |
Definition at line 459 of file webchild.h.
Referenced by IPCtrlWindow< ChildWindow, SIfacePtr< IWebBrowser2 > >::create_control(), and IPCtrlWindow< ChildWindow, SIfacePtr< IWebBrowser2 > >::WndProc().
OleInPlaceClient IPCtrlWindow< BASE, SMARTPTR >::_client_side [protected] |
Definition at line 460 of file webchild.h.
Referenced by IPCtrlWindow< ChildWindow, SIfacePtr< IWebBrowser2 > >::create_control(), and IPCtrlWindow< ChildWindow, SIfacePtr< IWebBrowser2 > >::WndProc().
SIfacePtr<IOleInPlaceObject> IPCtrlWindow< BASE, SMARTPTR >::_in_place_object [protected] |
Definition at line 461 of file webchild.h.
Referenced by IPCtrlWindow< ChildWindow, SIfacePtr< IWebBrowser2 > >::create_control(), and IPCtrlWindow< ChildWindow, SIfacePtr< IWebBrowser2 > >::WndProc().
IBrowser Source Code Documentation
generated on 18.09.2008 by |