新手向大家请教!
peasy 2003-08-22 11:32:11 现在我在程序中有两个窗体,
父窗体调用子窗体,
子窗体要引用窗体的变量m_addr(是在父窗体的public中声明的)。
我在子窗体中是这样写的:
void CTvPreview::OnPaint()
{
CPaintDC pDC(this); // device context for painting
pDC.TextOut(200,200,CTDlg.m_addr);
}
error C2275: 'CTDlg' : illegal use of this type as an expression
see declaration of 'CTDlg'
我应该如何写代码才对??
请各位市高手不吝赐教!!