My I ask why you aren't using CString?
You can pass your unsigned char * as a paramter to the constructor, or
you can create a new method for your dialog that takes a char * and saves
it, and you can call it before the call to DoModal(). There are tons of
options. Thats for the forth part. As for the back part, unless the
dialog is going to change the actual pointer then you already have what
you need, you don't need to get anything back from the dialog. If it is
going to assign a different value to the pointer, then you may need a get
metod, that you call when DoModal returns. It all depends on what you
intend to do with it.
CMyDlg2::CMyDlg2(unsigned char *pText,CWnd *pParent)
: CDialog(CMyDlg2::IDD,pParent)
, m_pText(pText)
{
}
{
CMyDialg Dlg2(pToChar,this);
Dlg2.DoModal();
}
AliR.
"Kahlua" <kahlua@right.here> wrote in message
news:VvdHj.26$fq2.19@trndny03...
I have the routine to open the second dialog (MyDlg2)
void CMyDlg::OnButton()
{
CMyDlg2 dlg;
dlg.DoModal();
}
How do I pass an unsigned char string of 12 chars back an forth between
MyDlg and MyDlg2?