Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to work with Wacom tablet. #998

Open
openGLnoob opened this issue Apr 23, 2017 · 14 comments
Open

Ability to work with Wacom tablet. #998

openGLnoob opened this issue Apr 23, 2017 · 14 comments
Labels
enhancement Feature suggestions and PRs input Keyboard, joystick or mouse Windows Win32 specific (not Cygwin or WSL)
Projects

Comments

@openGLnoob
Copy link

I try for few days to work with GLFW and Wacom and try to make they friendly. Unfortunately unsuccessfully. When I use Winapi I cant to get proper values for window handling such us LPARAM, WPARAM for calling WndProc function without creating second window (not a good solution). Working with tab libraryes as Easytab is also involves the use Winapi. Has anyone success towork with Wintab and GLFW? Maybe there is some tricks for that? Thanks.

@dmitshur
Copy link
Collaborator

dmitshur commented Apr 23, 2017

Issue #403 is related. It's an enhancement to GLFW, and that issue is currently open.

@elmindreda
Copy link
Member

@openGLnoob You can use a local window hook to get that if that's the only thing you need.

@elmindreda elmindreda added question Please use the support label instead waiting for reply Issues blocked waiting for information labels Apr 25, 2017
@openGLnoob
Copy link
Author

openGLnoob commented Apr 26, 2017

@elmindreda Thanks for tip. But I decided going another way. I try to edit GLFW lib for integration with Wintab into. With initialise Wintab no problem, but I can't come in into WT_PACKET. Moreover I noticed in message loop I never to come in into WM_CREATE. It's so strange because it's pretty important step in initializing window, don't it? With other cases seems no problem.

@elmindreda
Copy link
Member

@openGLnoob WM_CREATE is sent, not posted, so it doesn't pass through the GLFW message loop.

@openGLnoob
Copy link
Author

openGLnoob commented Apr 26, 2017

Ok, how can I activate WM_CREATE in message loop? In older versions of GLFW is used:

window->win32.handle = CreateWindowExW(exStyle,
_GLFW_WNDCLASSNAME,
wideTitle,
style,
xpos, ypos,
fullWidth, fullHeight,
NULL, // No parent window
NULL, // No window menu
GetModuleHandleW(NULL),
window);

Is that a right way? Or needs something else? I tried it but something wrong.((

@dmitshur dmitshur removed the waiting for reply Issues blocked waiting for information label Apr 27, 2017
@elmindreda
Copy link
Member

@openGLnoob I'm not sure what you are asking. If you want to handle WM_CREATE then you need to do it in the window proc, where other window messages are handled.

@elmindreda elmindreda added the Windows Win32 specific (not Cygwin or WSL) label Apr 30, 2017
@openGLnoob
Copy link
Author

openGLnoob commented May 1, 2017

If I just add WM_CREATE in windowProc it was ignoring in message loop. It was my reason asking you - how to force GLFW work with WM_CREATE?

@elmindreda
Copy link
Member

@openGLnoob Sorry, I don't understand the question.

@openGLnoob
Copy link
Author

Sorry if I can't explain enough what I want. In win32_window.c in the root of GLFW we can find message procedure windowProc(), right? But we can't find WM_CREATE in this message procedure and a adding WM_CREATE into this procedure don't resolve this problem - after a compilation of GLFW and a start program a window is created, but WM_CREATE case just ignore. How can I handle to creating window in a message loop in GLFW? I need WM_CREATE for initialization Wintab. If you know where I can initialize it in the moment of a creating window let me know.

@elmindreda
Copy link
Member

@openGLnoob I see, thanks! What version of GLFW are you modifying?

@openGLnoob
Copy link
Author

3.2.1 !

@elmindreda
Copy link
Member

@openGLnoob You need to catch WM_CREATE in the first switch statement in the window proc, as the window property has not yet been set at that point.

@openGLnoob
Copy link
Author

openGLnoob commented May 2, 2017

@elmindreda Thank you! That works!

@elmindreda elmindreda added the waiting for reply Issues blocked waiting for information label May 2, 2017
@openGLnoob
Copy link
Author

openGLnoob commented May 2, 2017

Ok. Done! The solution looks ugly, but works as expected. Use it.
https://github.com/openGLnoob/GLFW-WINTAB

@elmindreda elmindreda removed question Please use the support label instead waiting for reply Issues blocked waiting for information labels Jul 4, 2017
@elmindreda elmindreda added enhancement Feature suggestions and PRs input Keyboard, joystick or mouse labels Jul 14, 2022
@elmindreda elmindreda added this to Todo in Queue Jul 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature suggestions and PRs input Keyboard, joystick or mouse Windows Win32 specific (not Cygwin or WSL)
Projects
Queue
Todo
Development

No branches or pull requests

3 participants