I am using webview.h
and trying to create a webview as a child to my application.
This is the webview_create
function:
WEBVIEW_API webview_t webview_create(int debug, void *wnd) {
return new webview::webview(debug, wnd);
}
They are describing my problem in this issue:
https://github.com/webview/webview/issues/386
When I try to create the webview, it either crashes my application immediately, or resizes my entire application and crashes soon after (but loads the website).
In the GitHub issue, the problem was resolved by passing a pointer to the HWND variable
What I tried:
HWND parent = self.get_element_hwnd(false);
webview::webview w(false, parent);
HWND parent = self.get_element_hwnd(false);
webview::webview w(false, &parent);
HWND parent = self.get_element_hwnd(false);
HWND *pp = &parent;
webview::webview w(false, pp);
HWND parent = self.get_element_hwnd(false);
HWND *pp = &parent;
webview::webview w(false, &pp);
I thought passing the HWND like &parent
should work, but it doesn't.
Basically, I am guessing at this point. Would appreciate any help.