VS2022 MFC dialog editor cannot edit dialog hosting ActiveX control

Peter Boulton 26 Reputation points
2023-07-12T13:24:44.8066667+00:00

I am using VS2022 17.6.5, working on a MFC C++ application. I am trying to visually edit a dialog box which has the ActiveX control "Microsoft DataGrid Control 6.0 (SP6) (OLEDB)". When I double click the resource in the Resource View I get the expected warning "One or more ActiveX controls are in the current resource (.rc) file. If you trust the resource file supplier, click Yes to initialize and use the ActiveX controls. Otherwise, click No to exit.*"

However, when I click "Yes" I get the following error message and the visual editor does not appear:

The ActiveX control "Microsoft DataGrid Control 6.0 (SP6) (OLEDB)" is not registered on this computer. Register the control and try again.

I am pretty sure I have edited this dialog before in VS2022, but cannot work out what has changed.

I have (re-)registered the control via the following at an Administrator command prompt:

C:\Windows\SysWOW64\regsvr32.exe C:\Windows\SysWOW64\MSDATGRD.OCX

However, this makes no difference.

Any help in getting the dialog to appear in the visual editor would be greatly appreciated! Thanks.

Developer technologies C++
Developer technologies Visual Studio Other
0 comments No comments
{count} votes

Accepted answer
  1. RLWA32 49,536 Reputation points
    2023-07-12T13:51:10.3966667+00:00

    Visual Studio 2022 is a 64-bit application. Consequently, the dialog editor will not be able to use a 32-bit .ocx. Perhaps you can use an earlier version of VS (VS2019 was still 32-bit).

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.