Page 1 of 1

Invisible MFC ComboBox drop-arrow in x64 builds but not x86?

Posted: Wed Jun 14, 2017 1:45 pm
by Stub
I've been happily using Ranorex v6.2.1 against the VS2015.SP3 compiled Win32 build of our application on Windows 10 Pro. (I have NOT upgraded to Ranorex v7.0.0x. I do realise v7.0.0x is the latest version but I've been striving to finish our tests before upgrading. I want to know everything works on a particular version first).

I've just started looking at making sure our Ranorex tests also work against an identical Win64 build and have promptly hit a curious issue that I'm not sure how to deal with.

The drop-arrow on a ComboBox control is invisible in an x64 build and cannot be found by Ranorex Studio. As soon as I start the Win32 build it works fine, Ranorex Studio can find the drop arrow and click it. I do have the Enable 32/64 Bit Bridge option ENabled.
Enable3264BitBridge.png
I made a demo application to check it wasn't something odd about our application. I was able to reproduce it in a super-basic MFC dialog application onto which I dropped a ComboBox control.
CouldNotBeHighlighted.png
If I use 32bit Ranorex Spy on 32bit build -> drop arrow button visible and accessible.
32bit Ranorex Spy on 64bit build -> drop arrow button INvisible and INaccessible.
64bit Ranorex Spy on 32bit build -> drop arrow button visible and accessible.
64bit Ranorex Spy on 64bit build -> drop arrow button visible and accessible.

So there is this one case where I can't control my button. Does anybody have any ideas what I'm doing wrong here?

I have attached a snapshot taken with 32bit Spy of the 64bit application build. I'll try to attach some more files in a follow-up post because of the attachment limit.

Re: Invisible MFC ComboBox drop-arrow in x64 builds but not x86?

Posted: Wed Jun 14, 2017 1:49 pm
by Stub
I've also attached the super simple test application (quite literally an MFC dialog with ComboBox dropped onto the dialog UI).

And there are a couple of other snapshots from different variations.

Re: Invisible MFC ComboBox drop-arrow in x64 builds but not x86?

Posted: Thu Jun 22, 2017 12:43 pm
by Stub
I contacted Ranorex Support about this one. I had already started to work-around the issue by calculating a coordinate on the combo-box control to click. This coordinate was just inwards a little from the right-hand edge, where I knew the drop-arrow button control happened to be placed. Clicking the mouse left button at this point gets my combo to drop.

I can choose to look for the drop-arrow button control on 32bit builds, that still works reliably. It's a shame the repository item only works in 32bit builds however.

Ranorex suggested using image recognition to spot the button control but I didn't go to those lengths because the coordinate calculation seems to work well enough.