I've been tasked with producing a 64-bit version of an old-style Win32 Windows application, written in C/C++ and packaged as a DLL. The 64-bit app now runs but the controls in the dialog boxes don't look the same on Win64 as Win32. The reason is that the program performs a LoadLibrary("ctl3d32.dll")
and if successful, GetProcAddress()
is used to collect library entry points like Ctl3dSubclassCtl()
, and those entry points are then used to subclass each class of control.
However, the LoadLibrary()
fails in _WIN64
because there is no 64-bit version of this DLL. This causes the controls to be rendered using the default (this is on Windows 10 -- top is Win32, bottom is Win64):
Button controls look similar enough to pass, but static controls that are used like group boxes (they look like raised pads) are drawn as plain white rectangles and edit windows don't have that inset look.
I know the right way to do this is to move the app to visual styles but for right now, it needs to look the same in Win64 and Win32. I searched in vain for a style or flag that might turn on this behavior without referencing CTL3D32.DLL
.
Has anyone else encountered this problem and come up with a solution other than replicating this functionality in 64-bit GDI code or moving to Visual Styles?