C++/NodeJS Win32 API - add a WinHook to NPM win-control
- or -
Post a project like this$100
- Posted:
- Proposals: 3
- Remote
- #3448095
- PRE-FUNDED
- Expired
Description
Experience Level: Intermediate
You'll be working on the Win32 API (with NodeJS FFI bindings), this specific NPM:
https://github.com/nosolosoftware/win-control
-------------------------------
You'll add to this library (NPM) the possibility to know when a window is being resized, the property is:
WM_WINDOWPOSCHANGING
—————————
Now, I want to be able to intercept when a Window resize, get the size and details and then:
FORWARD_WM_WINDOWPOSCHANGING
I should be able to forward (FORWARD_WM_WINDOWPOSCHANGING) to the window (so it resizes) ONLY after I confirm by calling a JS function.
=================
Summary:
1) Get a window handler of my choice
2) Listen for WM_WINDOWPOSCHANGING continiously, you intercept window resize
3) You send me the info (window height/width...), and you let me confirm true/false if I allow or not in an ASYNC function, if I return false, you don't FORWARD_WM_WINDOWPOSCHANGING (the window DOES NOT resize).
If I reply true, you FORWARD_WM_WINDOWPOSCHANGING (the window RESIZE).
===================
To be clear on the goal:
You need to intercept a window when it resizes, send the resize info to a JS function, wait for a reply (YES/NO) and then accept or not the resize, in NodeJS. If
The main file (but not only) to modify is window.cpp in \node-window-manager\lib
https://github.com/nosolosoftware/win-control/blob/master/src/c%2B%2B/window.cpp
===================
For the JS side, here is an example of the function:
async function Window.OnWindowResize(Info) {
// NOTE: The JS function doesn't have to be like that, this is just AN EXAMPLE so you understand clearly the goal.
// It can be done differently (with a callback for example).
// NOTE2: The JS function HAS TO BE ASYNC.
// Do something with Info
return true; // If I return TRUE, you'll process with it (FORWARD_WM_WINDOWPOSCHANGING)
// If I return FALSE, you'll NOT process the resize.
}
===================
We should be receiving a ZIP/Tarball with the modified win-control library.
https://github.com/nosolosoftware/win-control
-------------------------------
You'll add to this library (NPM) the possibility to know when a window is being resized, the property is:
WM_WINDOWPOSCHANGING
—————————
Now, I want to be able to intercept when a Window resize, get the size and details and then:
FORWARD_WM_WINDOWPOSCHANGING
I should be able to forward (FORWARD_WM_WINDOWPOSCHANGING) to the window (so it resizes) ONLY after I confirm by calling a JS function.
=================
Summary:
1) Get a window handler of my choice
2) Listen for WM_WINDOWPOSCHANGING continiously, you intercept window resize
3) You send me the info (window height/width...), and you let me confirm true/false if I allow or not in an ASYNC function, if I return false, you don't FORWARD_WM_WINDOWPOSCHANGING (the window DOES NOT resize).
If I reply true, you FORWARD_WM_WINDOWPOSCHANGING (the window RESIZE).
===================
To be clear on the goal:
You need to intercept a window when it resizes, send the resize info to a JS function, wait for a reply (YES/NO) and then accept or not the resize, in NodeJS. If
The main file (but not only) to modify is window.cpp in \node-window-manager\lib
https://github.com/nosolosoftware/win-control/blob/master/src/c%2B%2B/window.cpp
===================
For the JS side, here is an example of the function:
async function Window.OnWindowResize(Info) {
// NOTE: The JS function doesn't have to be like that, this is just AN EXAMPLE so you understand clearly the goal.
// It can be done differently (with a callback for example).
// NOTE2: The JS function HAS TO BE ASYNC.
// Do something with Info
return true; // If I return TRUE, you'll process with it (FORWARD_WM_WINDOWPOSCHANGING)
// If I return FALSE, you'll NOT process the resize.
}
===================
We should be receiving a ZIP/Tarball with the modified win-control library.
Nicolas M.
0% (0)Projects Completed
-
Freelancers worked with
-
Projects awarded
0%
Last project
10 May 2024
Singapore
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies