NO

Recent Posts

Pages: 1 2 3 [4] 5 6 ... 10
31
Windows questions / Re: How to convert this sh*tcode to C?
« Last post by bitcoin on November 24, 2023, 09:27:21 PM »
Hello, Timo!
Can you see whole code here ? https://github.com/arsher/WebView2GettingStarted
I don't understand , what means Callback<..> , -> and other
32
Windows questions / Re: How to convert this sh*tcode to C?
« Last post by TimoVJL on November 24, 2023, 08:52:11 PM »
Not easily, something wrong with that code.
Reformat it better way.
33
Windows questions / How to convert this sh*tcode to C?
« Last post by bitcoin on November 24, 2023, 06:21:04 PM »
Can anybody tell me, what this code means and how to convert it to pure C? Is this possible?

Code: [Select]
// <-- 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);
}
34
Assembly discussions / Re: Status bar example
« Last post by Vortex on November 22, 2023, 09:47:19 PM »
Hi Timo,

Thanks, that's a nice idea.
35
Assembly discussions / Re: Status bar example
« Last post by TimoVJL on November 22, 2023, 09:31:54 PM »
Nice.
We should make some templates for starters.
Lot easier to start a project from tested template.
36
Assembly discussions / Status bar example
« Last post by Vortex on November 22, 2023, 08:33:56 PM »
Status bar example :

Code: [Select]
DlgProc PROC hWnd:DWORD,uMsg:DWORD,wParam:DWORD,lParam:DWORD

    .IF uMsg==WM_INITDIALOG

        xor     ecx,ecx
        invoke  CreateWindowEx,ecx,\
                @Cstr("msctls_statusbar32"),@Cstr("Status bar"),\
                WS_CHILD or WS_VISIBLE,\
                ecx,278,500,22,\
                hWnd,IDW_STATBAR,hModule,ecx

        invoke  SendMessage,eax,SB_SETBKCOLOR,0,StatBarCol
37
User contributions / Re: ToastLib a plain C Toast notification library
« Last post by John Z on November 21, 2023, 01:14:46 PM »
A plain C library to handle windows toast notifications.

Very very nice piece of work!

John Z
38
User contributions / Re: ToastLib a plain C Toast notification library
« Last post by frankie on November 21, 2023, 08:38:09 AM »
Hi Frankie,

Thanks, I managed to build and run the two examples on Windows 10. TestToastLib.exe expects 7 inputs from the user, is that OK?
Hello Erol,
Yes in the sample it emits 7 notifications as you can see in the loop:
Code: [Select]
/*
* Show some sample notifications.
*/
for (int i=0; i<7; i++)
{
if (!fToastSendNotification(hToast, wszText))
{
PostQuitMessage(1);
break;
}
Sleep(250);
}
I made this to check all functionalities during the debug, bat you can reduce the number if you want.
After the toasts are showed try to click everywhere inside one of them, then write down something and click send on the second. Then you can close the main app and repeat previous actions again. You'll see that the app restarts by itself.
The same happens with the GUI demo, only here you decide to show a toast.
You can change the dialog adding other inputs, controls, etc. simply modifying the XML template.
As you can see you don't need to interact at any level with windows runtime, but only use functions and handles.  ;)
To use toasts in your app you only need the library ToastLib.lib and the header ToastLib.h;D
39
User contributions / Re: ToastLib a plain C Toast notification library
« Last post by Vortex on November 21, 2023, 08:29:27 AM »
Hi Frankie,

Thanks, I managed to build and run the two examples on Windows 10. TestToastLib.exe expects 7 inputs from the user, is that OK?
40
User contributions / ToastLib a plain C Toast notification library
« Last post by frankie on November 21, 2023, 12:15:31 AM »
A plain C library to handle windows toast notifications.
Includes a console and a GUI sample demo.
This library is based on concepts derived from former work of Valentin-Gabriel Radu, but completely rewritten.
The main goal of the library is to hide the whole complex toast notification mechanisms inside library and making available to the user a couple of handles and few functions to register/unregister callback function and other 2 functions to create and destroy a notification manager.
The user must just supply the XML template for the toast in a memory string.
To speed-up compilation, and allow usage also un compilers that doesn't have windows runtime headers avalable, a condensated header is included will all required windows.runtime definitions. Also the runtime libraries, 32 and 64 bits versions, are supplied.

EDIT: Updated version and added VisualStudio project.

Download it from github.
Pages: 1 2 3 [4] 5 6 ... 10