Thanks. I haven't done much like that and am not sure everything that's
involved. But it might be workable and I'll look into it.
A simple option would be to create a dialog resource: child window, no
borders, control set to true (DS_CONTROL). Then simply drop your combo box
and a button (or whatever) onto it using dialog editor. You can then
create a wrapper class and use it in your code. Just make sure that any
dialog/window that uses it is flagged as 'Control Parent'
(WS_EX_CONTROL_PARENT).
This is as simple as it gets.
Bogdan
"Jonathan Wood" <jwood@softcircuits.com> wrote in message
news:OXi3XX9JJHA.2348@TK2MSFTNGP02.phx.gbl...
Greetings,
My MFC applications has several places where I need a combo box with a
small button right next to it. It would be nice to build this into a
control that I can reuse as needed.
This is only worth doing if I can make it very simple. ActiveX is
*definitely* not simple and I want nothing to do with that.
I know I can create an owner draw control, and that I can also subclass
existing controls. But, although I've worked with many languages that
make it extremely easy to create a reusable compound control, it doesn't
really seem that MFC lends itself to this.
The best idea I have is to register my from-scratch control class, which
would need to create any child controls by code, and then add a user
control to a dialog and specify my control's class.
Can anyone think of a simpler way?
Thanks.
--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com