Many many thanks to DeadMG stack overflow
http://stackoverflow.com/questions/3773378/passing-const-char-as-template-argument[
^]
template<class _Ty, const wchar_t* ptr>
struct CVHDialogTmpl
{
CVHDialogTmpl()
{
}
INT_PTR DoModal()
{
return t.DoModal(ptr);
}
_Ty t;
};
class VHRes
{
public:
static const wchar_t name[];
};
const wchar_t VHRes::name[] = L"XMLDlgPrj.xml";
CVHDialogTmpl<CXMLDlgPrjDlg, VHRes::name> dlg;