C language > Windows questions
How to convert this sh*tcode to C?
bitcoin:
Can anybody tell me, what this code means and how to convert it to pure C? Is this possible?
--- Code: ---// <-- WebView2 sample code starts here -->
// Step 3 - Create a single WebView within the parent window
// Locate the browser and set up the environment for WebView
CreateCoreWebView2EnvironmentWithOptions(nullptr, nullptr, nullptr,
Callback<ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler>(
[hWnd](HRESULT result, ICoreWebView2Environment* env) -> HRESULT {
// Create a CoreWebView2Controller and get the associated CoreWebView2 whose parent is the main window hWnd
env->CreateCoreWebView2Controller(hWnd, Callback<ICoreWebView2CreateCoreWebView2ControllerCompletedHandler>(
[hWnd](HRESULT result, ICoreWebView2Controller* controller) -> HRESULT {
if (controller != nullptr) {
webviewController = controller;
webviewController->get_CoreWebView2(&webviewWindow);
}
--- End code ---
TimoVJL:
Not easily, something wrong with that code.
Reformat it better way.
bitcoin:
Hello, Timo!
Can you see whole code here ? https://github.com/arsher/WebView2GettingStarted
I don't understand , what means Callback<..> , -> and other
TimoVJL:
These give some hints:
https://stackoverflow.com/questions/66820213/basic-win32-webview2-example-not-working-in-pure-c
https://github.com/MicrosoftEdge/WebView2Feedback/issues/1124
https://stackoverflow.com/questions/70768030/usage-icorewebview2environmentoptions-in-cbuilder-11
and
https://learn.microsoft.com/en-us/microsoft-edge/webview2/concepts/environment-controller-core?tabs=win32cpp
https://www.nuget.org/packages/Microsoft.Web.WebView2
bitcoin:
Thank you TimoVJL!
Why don't they (micro$oft) want , that we to use the C language? First in GDI+, where you can't call them with C. Yes, a visual studio (ms sdk) does not allow use flat Api! You can try it. Only PellesC includes work!
Navigation
[0] Message Index
[#] Next page
Go to full version