0

I have only the binary of a closed source MS Windows application.

Using the FindWindow [1] and GetClassName [2] functions revealed the class name of the main window of the application: "wxWindow" [3]. Consequently I assume the wxWidgets [4] GUI library was used.

Somewhere in this main window is presumably a "wxSlider" [5] component. My main goal is to control this "wxSlider" from another process. Is this even possible? If yes, how would you approach this problem?

Until now I have tried to circumvent the problem. The "wxSlider" component can be controlled via mouse wheel events [6]. At the moment I am using the "mouse_event" function [7] to simulate these events and control the slider. However, this allows only relative movement and is rather imprecise.

[1] http://msdn.microsoft.com/en-us/library/windows/desktop/ms633499(v=vs.85).aspx
[2] http://msdn.microsoft.com/en-us/library/ms633582(v=VS.85).aspx
[3] http://docs.wxwidgets.org/trunk/classwx_window.html
[4] https://www.wxwidgets.org/
[5] http://docs.wxwidgets.org/trunk/classwx_slider.html
[6] http://docs.wxwidgets.org/trunk/classwx_mouse_event.html
[7] http://msdn.microsoft.com/en-us/library/windows/desktop/ms646260(v=vs.85).aspx

Lars Schneider
  • 5,530
  • 4
  • 33
  • 58

1 Answers1

0

As wxSlider wraps the native up-down control, you should be able to send UDM_SETPOS[32] messages to it to change its value.

VZ.
  • 21,740
  • 3
  • 39
  • 42
  • How would I get the handle of this control? I just discovered Spy++ [8]. But I see just wxWindow classes there. Does this mean there is no wxSlider in use? [8] http://msdn.microsoft.com/en-us/library/aa264396(v=vs.60).aspx – Lars Schneider Mar 16 '14 at 10:23
  • It could be a custom slider-like control then -- which unfortunately means you're out of luck. Because a normal `wxSlider` definitely does use the native control of `msctls_trackbar32` class. – VZ. Mar 16 '14 at 13:17