Search

Steady Progress

This week, I had the opportunity to use the eye tracker more in my application and get used to using it. I also started working on integrating a hot key for the user to press when they hovered over a word. I have the space bar working for the most part, but I realized if some controls are already "highlighted" to be clicked on the screen (I have a button on my second screen that is like that), then clicking the hot key will click the highlighted item, and not where the mouse is on the screen.


I have also worked a little on the animation. I was having a really hard time finding the handle of the current window, and also getting the animation to run. I found some documentation on Microsoft that helped a lot, and my mistake was in not specifying the direction of the slide. I had as a parameter AW_SLIDE but without the direction added, it would not budge. Therefore, I added | AW_HOR_POSITIVE after AW_SLIDE.


To get the animation to run, I also had to hide the window and then show it. This is the code:

HWND handle = GetActiveWindow();

Hide();

AnimateWindow(handle, 2000, AW_SLIDE | AW_HOR_POSITIVE);

Show();


I am not thrilled with how this is working yet. It makes the Window completely disappear and then it slides in. Also, I need to mark the Windows behind it as invisible because otherwise this screen gets stuck behind the others.


Either way, more progress was made and I am thrilled the eye tracker is finally working. :)


0 views0 comments