| kruszi (5) | |||
|
Hi guys, first of all pleas excuse my rather bad English spelling. Well I am searching for a way to emulate a scrollwheel rotation. I need to scroll much more sensitive than the scrollwheel on the mouse does. Unfortunately I can not simply use keyboard emulation of up/down arrows. I've been programming vb.net for some years (hobby) and got to know some nice code in .NET which realises "all my dreams". It makes use of user32.
Unfortunately I am quiet new to Cpp but I have been doing a few basic things with C. But I never came to include more than math.h, stdio.h an so on. So can somebody help me to realise this in C++? The first thing I'm rather sure about is, that I need to include windows.h but that's where my knowlede gets to an end. So thanks for helping me greetings from Germany Michael | |||
|
|
|||
| modoran (1244) | |||
The port of that code to C++ is:
For more information see MSDN documentation: http://msdn.microsoft.com/en-us/library/windows/desktop/ms646260(v=vs.85).aspx | |||
|
|
|||
| kruszi (5) | |||
Hi thanks a lot, well unfortunately nothing works. My code:
Following Errors occure at the line containing: mouse_event(MOUSEEVENT_WHEEL, 0, 0, SCROLLDOWN, 0);- Invalid Arguments ' Candidates are: void mouse_event(unsigned long int,unsigned long int,unsigned long int,unsigned long int,unsigned long int) ' - Symbol 'MOUSEEVENT_WHEEL' could not be resolved In fact I do miss the Private Const MOUSEEVENT_WHEEL = &H800 but I don't know how to realise that =) Thanks Michael | |||
|
|
|||
| modoran (1244) | |
From the MSDN link I posted there is MOUSEEVENTF_WHEEL which is defined as 0x0800Why don't you read the documentation ? If you do, all of this looks much easier. And also please read what exactly this function do. | |
|
|
|
| kruszi (5) | |
Okay I think I need to do this more in detail. But I think I know what this function does - from MSDN: "The mouse_event function synthesizes mouse motion and button clicks". That is exactly what I want to do. I just don't know how to include correctly and how to "call" the function correctly. In my eyes the mous_event() is not resolved. So that's why I get the MOUSEEVENTF_WHEEL not resolved correctly. Is that right? Or did I do a huge mistake using the mous_event() in the main function? I just don't get what I missed ... thx | |
|
Last edited on
|
|
| kruszi (5) | |||
OH my god - I am a absolute dumb idiot.
nice one. spent 2 days on a missing "F". That's what I call bad luck. Well thanks a lot for helping me out. | |||
|
|
|||