Browse - Programming Tips - I want to use a Windows control in my application but don't want the
Q. I want to use a Windows control in my application but don't want the
hassle of installing in the registry that an OLE / ActiveX control requires.
What can I do?
A. A custom common control may work for you.
With this type of control in your resource (.rc) file like this:
CONTROL "", IDC_MY_CONTROL, "MyControl", WS_CHILD | WS_VISIBLE, 10, 10, 100, 100
Then in your code before you create the dialog you need to instantiate
a class called "MyControl" with RegisterClass().
Use UnregisterClass() when you control is no longer needed.
You class has to have a procedure that implements your control.
Your control can live in the same EXE (or DLL) as your dialog code.
This is a very nice lightweight way to make a control.
There are lots of tutorials