tags:

views:

228

answers:

1

Is it possible to take a DLGTEMPLATE and use it as a CWnd-derived control for placing in any other CWnd?

I have a dialog template that I want to use on one of my CDockablePanes

A: 

Your question isn't clear, please rephrase. If you're asking if it's possible to instantiate a control from a DLGTEMPLATE and put that instantiation on another dialog or as the child of another control, then yes, it is. It's a major PITA though, read through the Old New Thing blog (the series on dialog templates) if you want to know the details. If you just want to get it to work, use the CDlgTempl class from one of the MSDN samples; start here: http://support.microsoft.com/kb/155257. It won't make CWnd-derived controls but they're not what you want if you're asking what I think you are; you'll get a CDialog-derived object (which is itself derived from CWnd obviously, so in that sense it does give you what you ask).

Roel