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

Ranorex Spy, Recorder, and Studio.
User avatar
Stub
Posts: 173
Joined: Fri Jul 15, 2016 1:35 pm

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

Post by Stub » Wed Jun 14, 2017 1:45 pm

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
Enable3264BitBridge.png (12.2 KiB) Viewed 692 times
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
CouldNotBeHighlighted.png (21.45 KiB) Viewed 692 times
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.
Attachments
Win64BuildAnd32bitSpy.rxsnp
64bit build of test application viewed with 32bit Ranorex Spy, demonstrating the disabled drop arrow.
(9.99 KiB) Downloaded 23 times
Last edited by Stub on Wed Jun 14, 2017 2:14 pm, edited 2 times in total.

User avatar
Stub
Posts: 173
Joined: Fri Jul 15, 2016 1:35 pm

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

Post by Stub » Wed Jun 14, 2017 1:49 pm

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.
Attachments
ComboDropArrow.rar
Super mega simple C++ MFC test application.
(127.04 KiB) Downloaded 26 times
Win64BuildAnd64bitSpy.rxsnp
64bit application build working well with 64bit Ranorex Spy.
(10.13 KiB) Downloaded 24 times
Win32BuildAnd32bitSpy.rxsnp
32bit application build with 32bit Ranorex Spy
(10.12 KiB) Downloaded 24 times

User avatar
Stub
Posts: 173
Joined: Fri Jul 15, 2016 1:35 pm

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

Post by Stub » Thu Jun 22, 2017 12:43 pm

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.