We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I would like to handle MOUSEMOVE for a label, but it doesn't have such an event. I don't think labels support custom messages like here, right?
MOUSEMOVE
I can't use self.wnd.on().wm_mouse_move({ because it stops firing when the cursor moves over a control.
self.wnd.on().wm_mouse_move({
The text was updated successfully, but these errors were encountered:
I can use GetCursorPos in conjunction with ScreenToClient inside a loop, actually.
GetCursorPos
ScreenToClient
Sorry, something went wrong.
If you want to handle non-ordinary messages in a native control, you must subclass it, which is automatically done through on_subclass method.
on_subclass
Take care though. Subclassing is very dangerous, because you're messing with the internal message handling of the native control.
Is this correct? It works, but I don't know if it's best to put it inside fn events(&self) { /* ... */ }.
fn events(&self) { /* ... */ }
fn events(&self) { let label_events = self.lbl.on_subclass(); label_events.wm_mouse_move({ move |params| { println!("{},{}", params.coords.x, params.coords.y); } });
I can't test it right now, but it appears to be correct.
rodrigocfd
No branches or pull requests
I would like to handle
MOUSEMOVE
for a label, but it doesn't have such an event. I don't think labels support custom messages like here, right?I can't use
self.wnd.on().wm_mouse_move({
because it stops firing when the cursor moves over a control.The text was updated successfully, but these errors were encountered: