A component is meant to encapsulate all details required for a specific capability of the AppWindow, typically demonstrating usage of a WebView2 API. Component instances are owned by an AppWindow, which will give each of its components a chance to handle any messages it gets. AppWindow deletes all its components when WebView is closed. Components are meant to be created and registered by AppWind
| 19 | // user. Components typically take and keep a pointer to their owning AppWindow |
| 20 | // so they can control the WebView. |
| 21 | class ComponentBase |
| 22 | { |
| 23 | public: |
| 24 | // *result defaults to 0 |
| 25 | virtual bool HandleWindowMessage( |
| 26 | HWND hWnd, |
| 27 | UINT message, |
| 28 | WPARAM wParam, |
| 29 | LPARAM lParam, |
| 30 | LRESULT* result) |
| 31 | { |
| 32 | return false; |
| 33 | } |
| 34 | virtual ~ComponentBase() { } |
| 35 | }; |
nothing calls this directly
no outgoing calls
no test coverage detected