A family of Microsoft suites of integrated development tools for building applications for Windows, the web, mobile devices and many other platforms. Miscellaneous topics that do not fit into specific categories.
Visual Studio does not provide a documented, supported mechanism to surface arbitrary Win32 window-class–based custom controls (implemented in a plain DLL and registered with RegisterClass/Ex) directly in the Visual Studio toolbox for use in RC dialogs.
The documented guidance for using custom controls in dialog resources is:
- Use the dialog editor’s “custom control” support
- In the dialog editor, insert a generic/custom control placeholder.
- At design time, specify:
- The window class name of the control (the same name passed to RegisterClass/Ex).
- The style and extended style as 32-bit hex values.
- Position and size.
- At run time, ensure the custom control’s window class is registered (for example, by calling the DLL’s initialization function that registers the class) before the dialog is created.
- Prefer modern alternatives when possible
- The documentation notes that the “old technique” of using raw custom controls in dialog templates is largely superseded by:
- Subclassing existing common controls.
- Writing an ActiveX control.
- ActiveX controls and subclassed common controls integrate better with Visual Studio design-time tooling.
- The documentation notes that the “old technique” of using raw custom controls in dialog templates is largely superseded by:
- Owner-draw / self-draw approaches
- Another supported pattern is to use existing controls (buttons, static, list box, combo box) with owner-draw styles and implement custom drawing logic in the parent window or in a reusable class.
- This keeps the dialog editor working with standard controls while still allowing custom visuals and behavior.
The CustCntl.h header and the CustomControlInfoW export are not documented as a supported, public extension point for Visual Studio’s toolbox. The available documentation instead focuses on using dialog templates with custom window classes, common controls, owner-drawn controls, and ActiveX controls.
References: